Add -Wsingle-union warning for UNION without NEXTU (#2170)

This commit is contained in:
Rangi authored and GitHub committed 2026-09-27 20:02:42 -04:00
1 parent 62a9d8d518
commit ba4e58f4e0
11 files changed
+22 -3

No files matched your search

@@ -5,6 +5,7 @@ SECTION "test", WRAM0
UNION
INCLUDE "nonexistent1.inc"
WARN "still going!"
NEXTU
INCLUDE "nonexistent2.inc"
WARN "and going!"
ENDU
@@ -1,4 +1,4 @@
warning: still going! [-Wuser]
at continues-after-missing-include/a.asm(7)
warning: and going! [-Wuser]
at continues-after-missing-include/a.asm(9)
at continues-after-missing-include/a.asm(10)
@@ -5,6 +5,7 @@ SECTION "test", WRAM0
UNION
INCLUDE "nonexistent1.inc"
WARN "still going!"
NEXTU
INCLUDE "nonexistent2.inc"
WARN "and going!"
ENDU
@@ -1,4 +1,4 @@
warning: still going! [-Wuser]
at continues-after-missing-preinclude/a.asm(7)
warning: and going! [-Wuser]
at continues-after-missing-preinclude/a.asm(9)
at continues-after-missing-preinclude/a.asm(10)
+2
View File
@@ -0,0 +1,2 @@
warning: `UNION` construct has no `NEXTU` alternatives [-Wsingle-union]
at single-union.asm(4)