ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change
on this file since cdacb73 was
1d17939,
checked in by Andrew Beach <ajbeach@…>, 4 years ago
|
Implemented the recomented fix for #204, added at test that would have failed without it.
|
-
Property mode set to
100644
|
File size:
741 bytes
|
Rev | Line | |
---|
[f8de4e4] | 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 | |
---|
[1d17939] | 16 | forall(otype T) struct S { T p; }; |
---|
[62edde5] | 17 | int f; |
---|
[1d17939] | 18 | S(int) sint; |
---|
[62edde5] | 19 | |
---|
| 20 | void f() { |
---|
| 21 | int f; |
---|
| 22 | double f; |
---|
| 23 | (char)f; |
---|
| 24 | (int(*)())f; |
---|
| 25 | |
---|
[f8de4e4] | 26 | unsigned char v; |
---|
| 27 | short int v; |
---|
| 28 | 3, v; // implicit void cast |
---|
[1d17939] | 29 | |
---|
| 30 | (S(char)) sint; |
---|
[62edde5] | 31 | } |
---|
[f8de4e4] | 32 | |
---|
| 33 | int main() {} |
---|
| 34 | |
---|
| 35 | // Local Variables: // |
---|
| 36 | // tab-width: 4 // |
---|
| 37 | // compile-command: "cfa castError.cfa" // |
---|
| 38 | // End: // |
---|
Note: See
TracBrowser
for help on using the repository browser.