[Bug c/59668] extraneous error messages at -O1, -O2 and -O3 for valid code with string library functions

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jan 3 21:21:00 GMT 2014


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.



More information about the Gcc-bugs mailing list