ast-experimental
Last change
on this file since 8463136 was
85a95cc,
checked in by Peter A. Buhr <pabuhr@…>, 20 months ago
|
add test for problem with anonymous naming across compilation units
|
-
Property mode set to
100644
|
File size:
527 bytes
|
Line | |
---|
1 | #include "header.hfa" |
---|
2 | |
---|
3 | name_but_a_typedefed_t a_typedefed_global; |
---|
4 | |
---|
5 | // Must be extern C to prevent name mangling. |
---|
6 | extern "C" { |
---|
7 | // This declaration is necessary to create an instance of a_global_with_no_type. |
---|
8 | // typeof is a trick to get a_global_with_no_type's type because its type is anonymous. |
---|
9 | // Otherwise C generates conflicting types for a_global_with_no_type in .h and .c |
---|
10 | // because C uses name equivalence and the two anonymous types cannot have the same name. |
---|
11 | typeof(a_global_with_no_type) a_global_with_no_type; |
---|
12 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.