ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationnew-astnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change
on this file since d2de1be9 was
f8de4e4,
checked in by Peter A. Buhr <pabuhr@…>, 6 years ago
|
add test and formatting
|
-
Property mode set to
100644
|
File size:
675 bytes
|
Line | |
---|
1 | // |
---|
2 | // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo |
---|
3 | // |
---|
4 | // The contents of this file are covered under the licence agreement in the |
---|
5 | // file "LICENCE" distributed with Cforall. |
---|
6 | // |
---|
7 | // castError.cfa -- test invalid casts |
---|
8 | // |
---|
9 | // Author : Peter A. Buhr |
---|
10 | // Created On : Tue Feb 19 21:15:39 2019 |
---|
11 | // Last Modified By : Peter A. Buhr |
---|
12 | // Last Modified On : Tue Feb 19 21:16:44 2019 |
---|
13 | // Update Count : 1 |
---|
14 | // |
---|
15 | |
---|
16 | int f; |
---|
17 | |
---|
18 | void f() { |
---|
19 | int f; |
---|
20 | double f; |
---|
21 | (char)f; |
---|
22 | (int(*)())f; |
---|
23 | |
---|
24 | unsigned char v; |
---|
25 | short int v; |
---|
26 | 3, v; // implicit void cast |
---|
27 | } |
---|
28 | |
---|
29 | int main() {} |
---|
30 | |
---|
31 | // Local Variables: // |
---|
32 | // tab-width: 4 // |
---|
33 | // compile-command: "cfa castError.cfa" // |
---|
34 | // End: // |
---|
Note: See
TracBrowser
for help on using the repository browser.