- Timestamp:
- Mar 14, 2023, 4:21:05 PM (3 years ago)
- Branches:
- ADT, ast-experimental, master
- Children:
- 1afd9ccb, 360bfe41, 6e6989c
- Parents:
- 5217569 (diff), c19ca4b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- tests
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/io/comp_fair.cfa
r5217569 rdbae916 29 29 barrier & bar; 30 30 int pipe[2]; 31 32 31 } globals; 33 32 -
tests/linking/mangling/header.hfa
r5217569 rdbae916 8 8 extern name_but_a_typedefed_t a_typedefed_global; 9 9 10 extern struct /* anonymous */ { 11 int some_int; 12 int some_other_int; 13 } a_global_with_no_type; 10 // Must be extern C to prevent name mangling. 11 extern "C" { 12 extern struct /* anonymous */ { 13 int some_int; 14 int some_other_int; 15 } a_global_with_no_type; 16 } -
tests/linking/mangling/lib.cfa
r5217569 rdbae916 3 3 name_but_a_typedefed_t a_typedefed_global; 4 4 5 struct { 6 int some_int; 7 int some_other_int; 8 } a_global_with_no_type; 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 } -
tests/linking/mangling/main.cfa
r5217569 rdbae916 1 1 #include <fstream.hfa> 2 2 3 st ruct { int a; } test; //purposefully before the include3 static struct { int a; } test; // purposefully before the include to force anonymous name numbering 4 4 5 5 #include "header.hfa" … … 13 13 14 14 sout | "Done!"; 15 16 return 0;17 15 }
Note:
See TracChangeset
for help on using the changeset viewer.