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

su at cs dot ucdavis.edu gcc-bugzilla@gcc.gnu.org
Fri Jan 3 21:31:00 GMT 2014


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59668

--- Comment #3 from Zhendong Su <su at cs dot ucdavis.edu> ---
(In reply to Andrew Pinski from comment #2)
> 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.

Huh, that's interesting; thanks.  Could you give a pointer where this is
described? 

But again, how come the inconsistent behaviors at different optimization
levels? 

> You can fix your code by doing:
> int (strcmp)(const char *, const char *);
> 
> Instead.



More information about the Gcc-bugs mailing list