source: src/tests/KRfunctions.c @ 783dfd6

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 783dfd6 was 3a5131ed, checked in by Peter A. Buhr <pabuhr@…>, 7 years ago

handle KR function declarations

  • Property mode set to 100644
File size: 1.5 KB
Line 
1//                               -*- Mode: C -*-
2//
3// Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo
4//
5// The contents of this file are covered under the licence agreement in the
6// file "LICENCE" distributed with Cforall.
7//
8// KRfunctions.c --
9//
10// Author           : Peter A. Buhr
11// Created On       : Thu Feb 16 15:23:17 2017
12// Last Modified By : Peter A. Buhr
13// Last Modified On : Thu Feb 16 15:25:52 2017
14// Update Count     : 2
15//
16
17f0( a, b, c ) const int * b; {}
18f1( a, b, c ) int b __attribute__ (( unused )), * a, c[]; {}
19(f2)( a, b, c ) int a, * b, c[]; {}
20
21struct S { int i; };
22int f3( a, b, c ) struct S a; struct S b; int c[]; { struct S s;}
23int (f4)( a, b, c ) int a, * b, c[]; {}
24int (f5( a, b, c )) int a, * b, c[]; {}
25
26int (* f6( a, b, c ))(int) int a, * b, c[]; {}
27int (* f7( a, b, c ))(int a, int b) int a, * b, c[]; {}
28int * f8( a, b, c ) int a, * b, c[]; {}
29int * const f9( a, b, c ) int b, * a, c[]; {}
30
31int (* (* f10( a, b, c, y ))( int x, int y ) ) int a, * b, c[]; double y; {
32    int *x( int, int );
33    return x;
34}
35
36int (* f11( a, b, c ))[] int a, * b, c[]; {}
37int (* f12( a, b, c ))[][10] int a, * b, c[]; {}
38int ((* f13( a, b, c ))[])[10] int a, * b, c[]; {}
39int (((* f14( a, b, c ))[])[10]) int a, * b, c[]; {}
40
41const fred() {
42    int *(*x)( int, int );
43    int a, b;
44    x = f10( 3, &a, &b, 3.5 );
45    const f1( a, b, c ) int a, * b, c[]; {}
46    const f2( int a, int b, int c ) {}
47}
48
49// Local Variables: //
50// tab-width: 4 //
51// compile-command: "cfa KRfunctions.c" //
52// End: //
Note: See TracBrowser for help on using the repository browser.