https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67776
Bug ID: 67776 Summary: Missing warning when using asm labels Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gccbugzilla at limegreensocks dot com Target Milestone: --- When compiling this code: void f(void) { int foo asm("myfoo") = 42; } using: gcc -c sta7.c I (correctly) get the warning message: warning: ignoring asm-specifier for non-static local variable 'foo' However, if I rename the file from sta7.c to sta7.cpp, I no longer get the warning. Since the variable is still a non-static local variable, I expected to still get the warning. While not particularly interesting of itself, this makes me wonder what other c error checking might be getting skipped in c++.