pkgsrc/devel/cqual/patches/patch-aa
2006-07-17 22:16:55 +00:00

45 lines
1.5 KiB
Text

$NetBSD: patch-aa,v 1.3 2006/07/17 22:16:55 rillig Exp $
Removed C++-style comments.
Added the case of primitive types, since it had crashed when parsing the
definition of fdopen().
--- src/qtype.c.orig 2003-10-06 23:28:57.000000000 +0200
+++ src/qtype.c 2006-07-18 00:14:23.000000000 +0200
@@ -774,7 +774,7 @@ static void mktoplev_struct_cons_qtype(l
}
else if (exists_fieldflow_qual && fqt && (qtype_struct(qt) || qtype_union(qt))) {
qual outer = qual_qtype(qt);
- qual inner;
+ qual inner = outer;
if (qtype_pointer(fqt))
inner = qual_qtype(points_to_qtype(fqt));
@@ -1156,7 +1156,7 @@ qtype get_fdecl_qtype(const char *tag_na
type lifted_t;
struct ctq_info ctqi;
const char *fname;
- char *name = NULL;// = field_decl_name(fdecl);
+ char *name = NULL;
qtype result;
fname = field_decl_name(fdecl) ? field_decl_name(fdecl) : "(anonymous)";
@@ -2663,6 +2663,8 @@ aloc aloc_qtype(qtype qt)
qt = ecr_qtype(qt);
switch (qt->type->kind)
{
+ case tk_primitive:
+ return qt->type->u.prim.aloc;
case tk_pointer:
return qt->type->u.ptr.aloc;
case tk_pointer_loc:
@@ -3352,8 +3354,6 @@ static bool mkXeq_qtype(location loc, qu
new_link = t1;
}
- //new_ecr->u.tag.defined |= new_link->u.tag.defined;
- //new_ecr->u.tag.transparent_union |= new_link->u.tag.transparent_union;
ecr_fields = new_ecr->u.tag.fields;
ecr_name = new_ecr->u.tag.name;
kind = (t1->kind == tk_struct) ? "struct" : "union";