ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decaygc_noraiijacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newstringwith_gc
Last change
on this file since bfbf97f was
8a95629,
checked in by Peter A. Buhr <pabuhr@…>, 9 years ago
|
fix parsing error for syntax error message, work on regression testing
|
-
Property mode set to
100644
|
File size:
680 bytes
|
Rev | Line | |
---|
[51b7345] | 1 | int @max = 3; |
---|
| 2 | |
---|
| 3 | int 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 | |
---|
| 20 | int @foo(int) { |
---|
| 21 | return 7; |
---|
| 22 | } |
---|
[8a95629] | 23 | |
---|
| 24 | int @voon; |
---|
| 25 | double @voon; |
---|
| 26 | |
---|
| 27 | int @bort(int); |
---|
| 28 | int @bort(double); |
---|
| 29 | |
---|
| 30 | void g( int ); |
---|
| 31 | |
---|
| 32 | void 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.