source: src/tests/extension.c @ c87eb50

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change on this file since c87eb50 was c0aa336, checked in by Peter A. Buhr <pabuhr@…>, 8 years ago

third attempt at gcc attributes

  • Property mode set to 100644
File size: 1.5 KB
RevLine 
[8e9cbb2]1//
[00b7cd3]2// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
[8e9cbb2]3//
4// extension.c --
5//
6// Author           : Peter A. Buhr
7// Created On       : Mon Jul  4 20:42:43 2016
8// Last Modified By : Peter A. Buhr
[c0aa336]9// Last Modified On : Mon Feb  6 15:44:39 2017
10// Update Count     : 46
[8e9cbb2]11//
12
[c0aa336]13__extension__ __extension__ int a, b, c;
[8e9cbb2]14__extension__ struct S {
[c0aa336]15        __extension__ int a, b, c;
[8e9cbb2]16};
17__extension__ union U {
[c0aa336]18        __extension__ int a, b, c;
[8e9cbb2]19};
20__extension__ enum E {
[c0aa336]21        R, G, B,
[8e9cbb2]22};
23__extension__ typedef int www; // typedefs are removed => no output
[c0aa336]24__extension__ __extension__ int f();
25//__extension__ __extension__ asm( "nop" );
26#ifdef __cforall
27__extension__ __extension__ extern "C" {
28        int i, j;
29 }
30#endif // __cforall
[8e9cbb2]31
32__extension__ int fred( int p ) {
[c0aa336]33        __extension__ struct S {
34                __extension__ int a, b, c;
35#ifdef __cforall
36                __extension__ * int x, y, z;
37#endif // __cforall
38        };
39        int i = __extension__ a + __extension__ 3;
40        __extension__ 3;
41        __extension__ a;
42        __extension__ int a, b, c;
[8e9cbb2]43
[c0aa336]44        __extension__ a = __extension__ b + __extension__ c;
45        __extension__ fred( 3 );
46        __extension__ int mary( int p ) {}
47        __extension__ sizeof( 3 );
48        __extension__ (3 || 4);
49        __extension__ __alignof__( __extension__ a );
50        __extension__ a || __extension__ b && __extension__ c;
51        __extension__ a > __extension__ b ? __extension__ c : __extension__ c;
52        __extension__ a = __extension__ ( __extension__ b + __extension__ c );
53        __extension__ a, __extension__ b, __extension__ c;
[8e9cbb2]54}
55
56// Local Variables: //
57// tab-width: 4 //
58// compile-command: "cfa extension.c" //
59// End: //
Note: See TracBrowser for help on using the repository browser.