[Bug target/115874] sh.c appears to be missing include of stdio.h

joel at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jul 12 17:56:07 GMT 2024


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115874

--- Comment #3 from Joel Sherrill <joel at gcc dot gnu.org> ---
config.h includes auto-host.h which appears to be defining the macros:

/* Define to 1 if we found a declaration for 'fputc_unlocked', otherwise
   define to 0. */
#ifndef USED_FOR_TARGET
#define HAVE_DECL_FPUTC_UNLOCKED 1
#endif


/* Define to 1 if we found a declaration for 'fputs_unlocked', otherwise
   define to 0. */
#ifndef USED_FOR_TARGET
#define HAVE_DECL_FPUTS_UNLOCKED 1
#endif

If I add a #error before each of those defines, the compile gets there and hits
the #error. I made this chance to sh.cc and got the #error:

#include "config.h"
#ifdef HAVE_DECL_FPUTS_UNLOCKED
#error "joel"
#endif

I think that means the right feature macro is defined. What else might be
wrong?


More information about the Gcc-bugs mailing list