https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61162
Bug ID: 61162 Summary: possibly bad error location with -Wc++-compat Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: tromey at gcc dot gnu.org Consider this source: enum e { ZERO = 0, ONE }; enum e e_val; void f(void) { e_val = 0; } Compile with -Wc++-compat: bapiya. gcc -Wc++-compat --syntax-only r.c r.c: In function âfâ: r.c:7:3: warning: enum conversion in assignment is invalid in C++ [-Wc++-compat] e_val = 0; ^ I think perhaps using the location of the "=" would be preferable.