|
|
|
|
|
|
|
You get cast errors when you do something like this:
|
|
|
|
|
|
|
|
```c
|
|
|
|
int main() {
|
|
|
|
a0 = (char)0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
Which gives: `Element types of the cast-type "short" and the expr-type "int{4}" should be identical; types found: short and int{4}`
|
|
|
|
|
|
|
|
Weirdly this does not give an error:
|
|
|
|
|
|
|
|
```c
|
|
|
|
int main() {
|
|
|
|
a = (int[+])0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
Even though I don't think you should be able to cast a scaler to int[+].
|
|
|
|
|
|
|
|
Even this is fine!
|
|
|
|
|
|
|
|
```c
|
|
|
|
int main() {
|
|
|
|
a = (int[7])0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
``` |