http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59668
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|INVALID |DUPLICATE --- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Zhendong Su from comment #3) > (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? It is described in the C standard but I don't have the exact reference number for it though. > But again, how come the inconsistent behaviors at different optimization > levels? Because glibc decides only to implement the macro at -O and above but not when optimizing for size. > > > You can fix your code by doing: > > int (strcmp)(const char *, const char *); > > > > Instead. Anyways this is really a dup of bug 32449. *** This bug has been marked as a duplicate of bug 32449 ***