public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/58953] New: Unhelpful error message in conflict between enum and #define
@ 2013-11-01 3:02 michael at talamasca dot ocis.net
0 siblings, 0 replies; only message in thread
From: michael at talamasca dot ocis.net @ 2013-11-01 3:02 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58953
Bug ID: 58953
Summary: Unhelpful error message in conflict between enum and
#define
Product: gcc
Version: 4.8.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: michael at talamasca dot ocis.net
Consider the following invalid C code:
#define FALSE 0
#define TRUE 1
enum {FALSE = 0, TRUE = 1} BOOL;
Given in a single file, GCC produces a meaningful error message citing both one
of the #defines and the enum state.
However, if the #defines are in a system header, then the error message will
only cite the enumeration. This can be confusing -- it's not obvious the
compiler is really seeing "{0 = 0, 1 = 1}".
This case happens in real life, if the current version of libtiff (4.0.3) is
compiled against the current version of libjpeg (v9).
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-11-01 3:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-01 3:02 [Bug c/58953] New: Unhelpful error message in conflict between enum and #define michael at talamasca dot ocis.net
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).