This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/59668] extraneous error messages at -O1, -O2 and -O3 for valid code with string library functions
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 03 Jan 2014 21:21:24 +0000
- Subject: [Bug c/59668] extraneous error messages at -O1, -O2 and -O3 for valid code with string library functions
- Auto-submitted: auto-generated
- References: <bug-59668-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59668
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Actually this is neither a bug in GCC or glibc. In C, strcmp can be defined as
a macro and that is what you are getting a macro.
You can fix your code by doing:
int (strcmp)(const char *, const char *);
Instead.