[Bug c/51712] -Wtype-limits should not trigger for types of implementation-defined signedness
joseph at codesourcery dot com
gcc-bugzilla@gcc.gnu.org
Mon Apr 23 21:12:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51712
--- Comment #6 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2012-04-23 21:11:33 UTC ---
On Tue, 17 Apr 2012, manu at gcc dot gnu.org wrote:
> Unfortunately, I cannot see any way to know that FOO is a constant that comes
> from an enum. Joseph, is this possible to do in the C FE?
The original types of expressions that came from enums are already tracked
for use of -Wc++-compat (checking if C code is compatible with stricter
C++ rules for enums). (This is what c-typeck.c:build_external_ref uses
the type pointer for: storing the original type of an enum.) So the
information is available in at least parts of the C front end.
More information about the Gcc-bugs
mailing list