source: src/Tests/Attributes.c@ a8541d9

ADT aaron-thesis arm-eh ast-experimental cleanup-dtors ctor deferred_resn demangler enum forall-pointer-decay gc_noraii jacob/cs343-translation jenkins-sandbox memory new-ast new-ast-unique-expr new-env no_list persistent-indexer pthread-emulation qualifiedEnum resolv-new string stuck-waitfor-destruct with_gc
Last change on this file since a8541d9 was b1d6dd5, checked in by Peter A. Buhr <pabuhr@…>, 11 years ago

fix parsing error for EOF message, change cfa-ccp -x flag to -v, regression testing third attempt: consolidate example programs

  • Property mode set to 100644
File size: 680 bytes
Line 
1int @max = 3;
2
3int main() {
4 int x;
5 type @type(type t); // compiler intrinsic
6 type @widest(type t);
7 @type(x) *y; // gcc: typeof(x) *y;
8 const @widest(double) *w; // gcc: const typeof(x) *w;
9 * @type(3 + 4) z; // cfa declaration syntax
10 y = @max;
11 z = @max(x) + @size(int);
12 y = @min(3 + 4);
13 if ( @const(x) ) { }
14 if ( @volatile(y) ) { }
15 if ( @extern(y) ) { }
16 if ( @static(y) ) { }
17 @max;
18}
19
20int @foo(int) {
21 return 7;
22}
23
24int @voon;
25double @voon;
26
27int @bort(int);
28int @bort(double);
29
30void g( int );
31
32void f() {
33 float x;
34 double x;
35 @bort(x);
36 @bort(int);
37 g( @voon );
38}
39
40// Local Variables: //
41// tab-width: 4 //
42// End: //
Note: See TracBrowser for help on using the repository browser.