source: src/tests/extension.c @ 205ee4e

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

update include files for test programs

  • Property mode set to 100644
File size: 1.3 KB
Line 
1//
2// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
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
9// Last Modified On : Mon Jul  4 23:31:22 2016
10// Update Count     : 3
11//
12
13__extension__ int a, b, c;
14__extension__ struct S {
15    __extension__ int a, b, c;
16};
17__extension__ union U {
18    __extension__ int a, b, c;
19};
20__extension__ enum E {
21    R, G, B,
22};
23__extension__ typedef int www; // typedefs are removed => no output
24
25__extension__ int fred( int p ) {
26    __extension__ struct S {
27        __extension__ int a, b, c;
28    };
29    int i = __extension__ a + __extension__ 3;
30    __extension__ 3;
31    __extension__ a;
32    __extension__ int a, b, c;
33
34    __extension__ a = __extension__ b + __extension__ c;
35    __extension__ fred( 3 );
36    __extension__ sizeof( 3 );
37    __extension__ (3 || 4);
38    __extension__ __alignof__( __extension__ a );
39    __extension__ a || __extension__ b && __extension__ c;
40    __extension__ a > __extension__ b ? __extension__ c : __extension__ c;
41    __extension__ a = __extension__ ( __extension__ b + __extension__ c );
42    __extension__ a, __extension__ b, __extension__ c;
43}
44
45// Local Variables: //
46// tab-width: 4 //
47// compile-command: "cfa extension.c" //
48// End: //
Note: See TracBrowser for help on using the repository browser.