mirror of
https://github.com/mirror/tinycc.git
synced 2025-02-18 07:30:09 +08:00
Add warning 3
struct st {int a;} ss; int b; b = ss;
This commit is contained in:
parent
07614b5e22
commit
fcb3772a34
2
tccgen.c
2
tccgen.c
@ -2441,6 +2441,8 @@ static void gen_assign_cast(CType *dt)
|
|||||||
if (sbt == VT_PTR || sbt == VT_FUNC) {
|
if (sbt == VT_PTR || sbt == VT_FUNC) {
|
||||||
tcc_warning("assignment makes integer from pointer without a cast");
|
tcc_warning("assignment makes integer from pointer without a cast");
|
||||||
}
|
}
|
||||||
|
if (sbt == VT_STRUCT)
|
||||||
|
goto error;
|
||||||
/* XXX: more tests */
|
/* XXX: more tests */
|
||||||
break;
|
break;
|
||||||
case VT_STRUCT:
|
case VT_STRUCT:
|
||||||
|
Loading…
Reference in New Issue
Block a user