ADT
aaron-thesis
arm-eh
ast-experimental
cleanup-dtors
ctor
deferred_resn
demangler
enum
forall-pointer-decay
jacob/cs343-translation
jenkins-sandbox
memory
new-ast
new-ast-unique-expr
new-env
no_list
persistent-indexer
pthread-emulation
qualifiedEnum
resolv-new
with_gc
Last change
on this file since 6603c1d was e757af2, checked in by Thierry Delisle <tdelisle@…>, 9 years ago |
renamed all tests to lower-case leading character
|
-
Property mode
set to
100644
|
File size:
1.0 KB
|
Rev | Line | |
---|
[a0dcd2e] | 1 | // Constant test declaration
|
---|
[62edde5] | 2 |
|
---|
| 3 | // value
|
---|
| 4 |
|
---|
| 5 | int 0;
|
---|
| 6 | const int 0;
|
---|
| 7 | int 1;
|
---|
| 8 | const int 1;
|
---|
[a0dcd2e] | 9 | struct { int i; } 0;
|
---|
| 10 | const struct { int i; } 1;
|
---|
| 11 |
|
---|
| 12 | #ifdef DUPS
|
---|
| 13 |
|
---|
| 14 | int 0;
|
---|
| 15 | const int 0;
|
---|
| 16 | int 1;
|
---|
| 17 | const int 1;
|
---|
[62edde5] | 18 | int (0), (1);
|
---|
| 19 | int ((0)), ((1));
|
---|
[a0dcd2e] | 20 | const int 0, 1;
|
---|
| 21 | const int (0), (1);
|
---|
[62edde5] | 22 | struct { int i; } 0;
|
---|
| 23 | const struct { int i; } 1;
|
---|
[a0dcd2e] | 24 |
|
---|
| 25 | #endif // DUPS
|
---|
| 26 |
|
---|
| 27 | #ifndef NEWDECL
|
---|
[62edde5] | 28 |
|
---|
| 29 | // pointer
|
---|
| 30 |
|
---|
[a0dcd2e] | 31 | int *0, *1;
|
---|
| 32 | int * const (0), * const 1;
|
---|
| 33 | struct { int i; } *0;
|
---|
| 34 | const struct { int i; } *0;
|
---|
| 35 | int (*(* const x)), **0;
|
---|
| 36 |
|
---|
| 37 | #ifdef DUPS
|
---|
| 38 |
|
---|
[62edde5] | 39 | int *0, *1;
|
---|
| 40 | int *(0), *(1);
|
---|
| 41 | int (*0), (*1);
|
---|
| 42 | int ((*0)), ((*1));
|
---|
| 43 | int * const (0), * const 1;
|
---|
| 44 | int (* const 0), (* const 1);
|
---|
| 45 | int ((* const 0)), ((* const 1));
|
---|
[a0dcd2e] | 46 | int (*(* const x)), *(*0);
|
---|
| 47 | int (*(* const x)), (*(*0));
|
---|
[62edde5] | 48 | struct { int i; } *0;
|
---|
[a0dcd2e] | 49 | const struct { int i; } *0;
|
---|
| 50 | int (*(* const x)), **0;
|
---|
| 51 |
|
---|
| 52 | #endif // DUPS
|
---|
| 53 |
|
---|
| 54 | #else
|
---|
[62edde5] | 55 |
|
---|
| 56 | // Cforall style
|
---|
| 57 |
|
---|
| 58 | * int x, 0;
|
---|
| 59 | const * int x, 0;
|
---|
| 60 | * struct { int i; } 0;
|
---|
| 61 | const * struct { int i; } 0;
|
---|
| 62 | const * * int x, 0;
|
---|
| 63 |
|
---|
[a0dcd2e] | 64 | #ifdef DUPS
|
---|
| 65 |
|
---|
| 66 | * int x, 0;
|
---|
| 67 | const * int x, 0;
|
---|
| 68 |
|
---|
| 69 | #endif // DUPS
|
---|
| 70 |
|
---|
| 71 | #endif // NEWDECL
|
---|
| 72 |
|
---|
[62edde5] | 73 | int main() {
|
---|
[a0dcd2e] | 74 | #ifndef NEWDECL
|
---|
[62edde5] | 75 | int 1, * 0;
|
---|
[a0dcd2e] | 76 | #else
|
---|
[62edde5] | 77 | * int x, 0;
|
---|
[a0dcd2e] | 78 | #endif // NEWDECL
|
---|
[62edde5] | 79 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.