projects
/
cparser
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1806315
)
print transparent union modifiers for types
author
Matthias Braun
<matze@braunis.de>
Tue, 25 Nov 2008 13:35:11 +0000
(13:35 +0000)
committer
Matthias Braun
<matze@braunis.de>
Tue, 25 Nov 2008 13:35:11 +0000
(13:35 +0000)
[r23986]
type.c
patch
|
blob
|
history
diff --git
a/type.c
b/type.c
index
f2e804e
..
6640145
100644
(file)
--- a/
type.c
+++ b/
type.c
@@
-554,6
+554,9
@@
void print_compound_definition(const compound_t *compound)
change_indent(-1);
print_indent();
fputs("}", out);
+ if (compound->modifiers & DM_TRANSPARENT_UNION) {
+ fputs("__attribute__((__transparent_union__))", out);
+ }
}
/**
@@
-708,6
+711,10
@@
static void intern_print_type_post(const type_t *const type, const bool top)
case TYPE_TYPEDEF:
break;
}
+
+ if (type->base.modifiers & DM_TRANSPARENT_UNION) {
+ fputs("__attribute__((__transparent_union__))", out);
+ }
}
/**