digitalmars.D.bugs - [Issue 6449] New: Unused label warning
- d-bugmail puremagic.com (33/33) Aug 07 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6449
http://d.puremagic.com/issues/show_bug.cgi?id=6449 Summary: Unused label warning Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: diagnostic Severity: enhancement Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: bearophile_hugs eml.cc This is related to issue 3960 (that is about unused variable warnings). This is a C program (it's valid D code too): int main() { int x = 0; A: if (x) goto B; x++; B: return x; } With DMD 2.054 it gives no errors or warnings, but GCC 4.6.0 shows a warning that I'd like in D too (it's less commonly useful than unused variable warnings): ...>gcc -Wall test.c -o test test.c: In function 'main': test.c:3:5: warning: label 'A' defined but not used [-Wunused-label] -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Aug 07 2011