Hi Andrew,

Andrew Hamilton wrote:
> > Gnulib does not care about -Wundef warnings, because eliminating all
> > of them would require many changes, that are just code verbosity:
> > it would make reading and maintaining the code harder, without real
> > benefit.
> 
> 
> The problem is this is in a header included by non-Gnulib source so it is
> compiled with the Grub compile flags instead of the Grub-Gnulib compiler
> flags. We do actually disable Wundef for when we compile Gnulib:
> https://gitlab.freedesktop.org/gnu-grub/grub/-/blob/master/conf/Makefile.common?ref_type=heads#L80
> 
> This was the only such case I found when pulling in the new Gnulib, the
> above change allowed Grub to compile along with the new Gnulib.

I'm surprised you did not get more occurrences of this warning:

  - When you use Autoconf's AC_CHECK_FUNC or AC_CHECK_DECL, you get a HAVE_*
    symbol that is either undefined or defined to 1. Never defined to 0.

  - Likewise, many Gnulib header files use such HAVE_* symbols:

$ grep ' HAVE_' lib/*.h|grep -v HAVE_RAW_DECL_|grep -v ':/[*]'
lib/acl.h:#if HAVE_LINUX_XATTR_H && HAVE_LISTXATTR
lib/acl.h:#if (HAVE_LINUX_XATTR_H && HAVE_LISTXATTR \
lib/acl-internal.h:#if HAVE_SYS_ACL_H
lib/acl-internal.h:#if defined HAVE_FACL && ! defined GETACLCNT && defined 
ACL_CNT
lib/acl-internal.h:#ifdef HAVE_ACL_LIBACL_H
lib/acl-internal.h:#if HAVE_ACLV_H
lib/acl-internal.h:#ifndef HAVE_FCHMOD
lib/acl-internal.h:# define HAVE_FCHMOD false
lib/acl-internal.h:# if HAVE_ACL_GET_FILE
lib/acl-internal.h:#  ifdef HAVE_ACL_GET_FD
lib/acl-internal.h:#   define HAVE_ACL_GET_FD false
lib/acl-internal.h:#  ifdef HAVE_ACL_SET_FD
lib/acl-internal.h:#   define HAVE_ACL_SET_FD false
lib/acl-internal.h:#  if ! HAVE_ACL_FREE_TEXT
lib/acl-internal.h:#  if !defined HAVE_ACL_EXTENDED_FILE || defined __CYGWIN__
lib/acl-internal.h:#   undef HAVE_ACL_EXTENDED_FILE
lib/acl-internal.h:#   define HAVE_ACL_EXTENDED_FILE false
lib/acl-internal.h:#  if ! defined HAVE_ACL_FROM_MODE && ! defined 
HAVE_ACL_FROM_TEXT
lib/acl-internal.h:#  if HAVE_ACL_COPY_EXT_NATIVE && HAVE_ACL_CREATE_ENTRY_NP 
/* Mac OS X */
lib/acl-internal.h:#  if HAVE_ACL_TYPE_EXTENDED /* Mac OS X */
lib/acl-internal.h:# elif HAVE_FACL && defined GETACL /* Solaris, Cygwin < 2.5, 
not HP-UX */
lib/acl-internal.h:# elif HAVE_GETACL /* HP-UX */
lib/acl-internal.h:#  if HAVE_ACLV_H /* HP-UX >= 11.11 */
lib/acl-internal.h:# elif HAVE_ACLX_GET && 0 /* AIX */
lib/acl-internal.h:# elif HAVE_STATACL /* older AIX */
lib/acl-internal.h:# elif HAVE_ACLSORT /* NonStop Kernel */
lib/acl-internal.h:# if HAVE_ACL_GET_FILE /* Linux, FreeBSD, Mac OS X, Cygwin 
>= 2.5 */
lib/acl-internal.h:# elif HAVE_GETACL /* HP-UX */
lib/acl-internal.h:#  if HAVE_ACLV_H
lib/acl-internal.h:# elif HAVE_STATACL /* older AIX */
lib/acl-internal.h:# elif HAVE_ACLSORT /* NonStop Kernel */
lib/alignalloc.h:   _GL_ATTRIBUTE_MALLOC, _GL_ATTRIBUTE_RETURNS_NONNULL, 
HAVE_POSIX_MEMALIGN.  */
lib/alignalloc.h:#if (2 < __GLIBC__ + (16 <= __GLIBC_MINOR__)) && 
HAVE_WORKING_ALIGNED_ALLOC
lib/alignalloc.h:#if ALIGNALLOC_VIA_ALIGNED_ALLOC || HAVE_POSIX_MEMALIGN
lib/alignalloc.h:#else /* ! (ALIGNALLOC_VIA_ALIGNED_ALLOC || 
HAVE_POSIX_MEMALIGN) */
lib/aligned-malloc.h:   HAVE_MEMALIGN.  */
lib/aligned-malloc.h:#if ((ALIGNMENT) <= MALLOC_ALIGNMENT) || 
HAVE_POSIX_MEMALIGN || HAVE_ALIGNED_ALLOC || HAVE_MEMALIGN
lib/aligned-malloc.h:# elif HAVE_POSIX_MEMALIGN
lib/aligned-malloc.h:# elif HAVE_ALIGNED_ALLOC
lib/aligned-malloc.h:# elif HAVE_MEMALIGN                    /* HP-UX, Solaris 
<= 10 */
lib/argp.h:# undef HAVE_DECL_PROGRAM_INVOCATION_NAME
lib/argp.h:# define HAVE_DECL_PROGRAM_INVOCATION_NAME 1
lib/argp.h:# undef HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
lib/argp.h:# define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 1
lib/argp-namefrob.h:#if (defined HAVE_DECL_CLEARERR_UNLOCKED  && 
!HAVE_DECL_CLEARERR_UNLOCKED \
lib/argp-namefrob.h:#if (defined HAVE_DECL_FEOF_UNLOCKED && 
!HAVE_DECL_FEOF_UNLOCKED \
lib/argp-namefrob.h:#if (defined HAVE_DECL_FERROR_UNLOCKED && 
!HAVE_DECL_FERROR_UNLOCKED \
lib/argp-namefrob.h:#if (defined HAVE_DECL_FFLUSH_UNLOCKED && 
!HAVE_DECL_FFLUSH_UNLOCKED \
lib/argp-namefrob.h:#if (defined HAVE_DECL_FGETS_UNLOCKED && 
!HAVE_DECL_FGETS_UNLOCKED \
lib/argp-namefrob.h:#if (defined HAVE_DECL_FPUTC_UNLOCKED && 
!HAVE_DECL_FPUTC_UNLOCKED \
lib/argp-namefrob.h:#if (defined HAVE_DECL_FPUTS_UNLOCKED && 
!HAVE_DECL_FPUTS_UNLOCKED \
lib/argp-namefrob.h:#if (defined HAVE_DECL_FREAD_UNLOCKED && 
!HAVE_DECL_FREAD_UNLOCKED \
lib/argp-namefrob.h:#if (defined HAVE_DECL_FWRITE_UNLOCKED && 
!HAVE_DECL_FWRITE_UNLOCKED \
lib/argp-namefrob.h:#if (defined HAVE_DECL_GETC_UNLOCKED && 
!HAVE_DECL_GETC_UNLOCKED \
lib/argp-namefrob.h:#if (defined HAVE_DECL_GETCHAR_UNLOCKED && 
!HAVE_DECL_GETCHAR_UNLOCKED \
lib/argp-namefrob.h:#if (defined HAVE_DECL_PUTC_UNLOCKED && 
!HAVE_DECL_PUTC_UNLOCKED \
lib/argp-namefrob.h:#if (defined HAVE_DECL_PUTCHAR_UNLOCKED && 
!HAVE_DECL_PUTCHAR_UNLOCKED \
lib/argp-namefrob.h:#if defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
lib/boot-time-aux.h:# if HAVE_DECL_SYSINFO /* not available in Android API < 9 
*/
lib/boot-time-aux.h:#if HAVE_SYS_SYSCTL_H && HAVE_SYSCTL \
lib/boot-time-aux.h:#if HAVE_OS_H /* BeOS, Haiku */
lib/c32is-impl.h:#elif HAVE_WORKING_MBRTOC32 && HAVE_WORKING_C32RTOMB /* glibc, 
NetBSD ≥ 11, Android */
lib/c32to-impl.h:#elif HAVE_WORKING_MBRTOC32 && HAVE_WORKING_C32RTOMB /* glibc, 
NetBSD ≥ 11, Android */
lib/careadlinkat.h:#if HAVE_READLINKAT
lib/dirent-private.h:#if HAVE_DIRENT_H                       /* mingw */
lib/filemode.h:# if HAVE_DECL_STRMODE
lib/fpending.h:   HAVE_DECL___FPENDING.  */
lib/fpending.h:#if HAVE_STDIO_EXT_H
lib/fpe-trapping.h:# define HAVE_FPE_TRAPPING 1
lib/freadable.h:#if HAVE___FREADABLE
lib/freadable.h:# if HAVE_STDIO_EXT_H
lib/freadahead.h:#if HAVE___FREADAHEAD /* musl libc, Android API level ≥ 33 */
lib/freading.h:#if HAVE___FREADING && (!defined __GLIBC__ || defined __UCLIBC__ 
|| __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7))
lib/freading.h:# if HAVE_STDIO_EXT_H
lib/freadptr.h:#if HAVE___FREADPTR /* musl libc */
lib/fseterr.h:#if HAVE___FSETERR /* musl libc */
lib/fwritable.h:#if HAVE___FWRITABLE
lib/fwritable.h:# if HAVE_STDIO_EXT_H
lib/fwriting.h:#if HAVE___FWRITING
lib/fwriting.h:# if HAVE_STDIO_EXT_H
lib/gethrxtime.h:   HAVE_DECL_GETHRTIME.  */
lib/gethrxtime.h:#if HAVE_ARITHMETIC_HRTIME_T && HAVE_DECL_GETHRTIME
lib/hamt.h:#ifndef HAVE_C11__ATOMIC
lib/hamt.h:#  define HAVE_C11__ATOMIC 1
lib/hamt.h:#  define HAVE_C11__ATOMIC 0
lib/hamt.h:#if HAVE_C11__ATOMIC
lib/immutable.h:#if !NO_IMMUTABLE && ((defined _WIN32 && !defined __CYGWIN__) 
|| HAVE_WORKING_MPROTECT)
lib/isapipe.h:#ifndef HAVE_FIFO_PIPES
lib/isapipe.h:# define HAVE_FIFO_PIPES (-1)
lib/is_l-impl.h:#if HAVE_WINDOWS_LOCALE_T
lib/is_l-impl.h:# if HAVE_WORKING_USELOCALE
lib/is_l-impl.h:# if HAVE_WORKING_USELOCALE
lib/isnand-nolibm.h:#if HAVE_ISNAND_IN_LIBC
lib/isnand-nolibm.h:#define HAVE_ISNAND_NOLIBM 1
lib/isnanf-nolibm.h:#if HAVE_ISNANF_IN_LIBC
lib/isnanf-nolibm.h:#define HAVE_ISNANF_NOLIBM 1
lib/isnanl-nolibm.h:#if HAVE_ISNANL_IN_LIBC
lib/isnanl-nolibm.h:#define HAVE_ISNANL_NOLIBM 1
lib/libc-config.h:# ifndef HAVE___INLINE
lib/localename-table.h:#if HAVE_WORKING_USELOCALE && HAVE_NAMELESS_LOCALES
lib/malloca.h:   _GL_ATTRIBUTE_MALLOC, HAVE_ALLOCA.  */
lib/malloca.h:#if HAVE_ALLOCA
lib/malloca.h:#if HAVE_ALLOCA
lib/malloca.h:#if HAVE_ALLOCA
lib/math.in.h:#   elif defined isnan && !defined HAVE_ISNANF_NOLIBM
lib/math.in.h:#   elif !defined HAVE_ISNAND_NOLIBM
lib/math.in.h:#  elif defined isnan && !defined HAVE_ISNANL_NOLIBM
lib/mbswidth.h:#if HAVE_DECL_MBSWIDTH_IN_WCHAR_H
lib/mbtowc-lock.h:#elif HAVE_PTHREAD_API /* AIX, Cygwin */
lib/mbtowc-lock.h:# if HAVE_WEAK_SYMBOLS
lib/mbtowc-lock.h:#elif HAVE_THREADS_H
lib/md5.h:# if HAVE_OPENSSL_MD5
lib/md5.h:#    undef HAVE_OPENSSL_MD5
lib/md5.h:#  if HAVE_OPENSSL_MD5
lib/md5.h:# if HAVE_OPENSSL_MD5
lib/minmax.h:#if HAVE_MINMAX_IN_LIMITS_H
lib/minmax.h:#elif HAVE_MINMAX_IN_SYS_PARAM_H
lib/msvc-inval.h:#if HAVE_MSVC_INVALID_PARAMETER_HANDLER \
lib/msvc-nothrow.h:# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
lib/openat.h:   _GL_ATTRIBUTE_DEPRECATED, HAVE_OPENAT.  */
lib/pathmax.h:# if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined 
MAXPATHLEN
lib/pipe-filter-aux.h:# undef HAVE_SELECT
lib/pipe-filter-aux.h:#if HAVE_SELECT
lib/printf-args.h:#if HAVE_WINT_T
lib/printf-args.h:#if HAVE_WINT_T
lib/printf-args.h:#if HAVE_WINT_T
lib/printf-parse.h:#if HAVE_FEATURES_H
lib/priv-set.h:   HAVE_GETPPRIV.  */
lib/priv-set.h:#if HAVE_GETPPRIV && HAVE_PRIV_H
lib/readline.h:#if HAVE_READLINE_READLINE_H
lib/readutmp.h:   HAVE_UTMP_H, HAVE_UTMPX_H, HAVE_STRUCT_UTMP_*, 
HAVE_STRUCT_UTMPX_*,
lib/readutmp.h:   HAVE_UTMPNAME, HAVE_UTMPXNAME.  */
lib/readutmp.h:#if (HAVE_UTMPX_H && HAVE_UTMP_H && HAVE_STRUCT_UTMP_UT_EXIT \
lib/readutmp.h:     && ! HAVE_STRUCT_UTMPX_UT_EXIT)
lib/readutmp.h:# undef HAVE_UTMPX_H
lib/readutmp.h:#if HAVE_UTMP_H
lib/readutmp.h:#if HAVE_UTMPX_H
lib/readutmp.h:#if HAVE_UTMPX_H
lib/readutmp.h:# ifdef HAVE_UTMPXNAME /* glibc, musl, macOS, NetBSD, Minix, 
Solaris, Cygwin */
lib/readutmp.h:#elif HAVE_UTMP_H
lib/readutmp.h:# ifdef HAVE_UTMPNAME /* glibc, musl, NetBSD, Minix, AIX, HP-UX, 
Solaris, Cygwin, Android */
lib/readutmp.h:#define HAVE_STRUCT_XTMP_UT_ID \
lib/readutmp.h:   || (HAVE_UTMPX_H ? HAVE_STRUCT_UTMPX_UT_ID : 
HAVE_STRUCT_UTMP_UT_ID))
lib/readutmp.h:#define HAVE_STRUCT_XTMP_UT_PID \
lib/readutmp.h:   || (HAVE_UTMPX_H ? HAVE_STRUCT_UTMPX_UT_PID : 
HAVE_STRUCT_UTMP_UT_PID))
lib/readutmp.h:#define HAVE_STRUCT_XTMP_UT_HOST \
lib/readutmp.h:   || (HAVE_UTMPX_H ? HAVE_STRUCT_UTMPX_UT_HOST : 
HAVE_STRUCT_UTMP_UT_HOST))
lib/readutmp.h:#if !(HAVE_UTMPX_H ? HAVE_STRUCT_UTMPX_UT_TYPE : 
HAVE_STRUCT_UTMP_UT_TYPE)
lib/readutmp.h:#if READUTMP_USE_SYSTEMD || HAVE_UTMPX_H || HAVE_UTMP_H || 
defined __CYGWIN__ || defined _WIN32
lib/regex_internal.h:#if !defined _LIBC && ! (defined isblank || (HAVE_ISBLANK 
&& HAVE_DECL_ISBLANK))
lib/regex_internal.h:#if defined _LIBC || HAVE_MALLOC_0_NONNULL
lib/relocatable.h:#if HAVE_VISIBILITY && BUILDING_DLL
lib/sd-dlopen.h:        && defined HAVE_ASM_IFNDEF_ENDIF_BALIGN && 
HAVE_ASM_IFNDEF_ENDIF_BALIGN
lib/sha1.h:# if HAVE_OPENSSL_SHA1
lib/sha1.h:#    undef HAVE_OPENSSL_SHA1
lib/sha1.h:#  if HAVE_OPENSSL_SHA1
lib/sha1.h:# if HAVE_OPENSSL_SHA1
lib/sha256.h:# if HAVE_OPENSSL_SHA256
lib/sha256.h:#    undef HAVE_OPENSSL_SHA256
lib/sha256.h:#  if HAVE_OPENSSL_SHA256
lib/sha256.h:# if HAVE_OPENSSL_SHA256
lib/sha3.h:# if HAVE_OPENSSL_SHA3
lib/sha3.h:# if HAVE_OPENSSL_SHA3
lib/sha512.h:# if HAVE_OPENSSL_SHA512
lib/sha512.h:#    undef HAVE_OPENSSL_SHA512
lib/sha512.h:#  if HAVE_OPENSSL_SHA512
lib/sha512.h:# if HAVE_OPENSSL_SHA512
lib/signed-snan.h:#if HAVE_SNANF
lib/signed-snan.h:#if HAVE_SNAND
lib/signed-snan.h:#if HAVE_SNANL
lib/signed-snan.h:   CC="gcc -mfpmath=387", if HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 
is 1, the
lib/sigsegv.in.h:# define HAVE_SIGSEGV_RECOVERY 1
lib/sigsegv.in.h:# define HAVE_STACK_OVERFLOW_RECOVERY 1
lib/sigsegv.in.h:#if 1 /* really only HAVE_SIGSEGV_RECOVERY */
lib/sigsegv.in.h:#endif /* HAVE_SIGSEGV_RECOVERY */
lib/sigsegv.in.h:#if 1 /* really only HAVE_STACK_OVERFLOW_RECOVERY */
lib/sigsegv.in.h:#endif /* HAVE_STACK_OVERFLOW_RECOVERY */
lib/size_max.h:# if HAVE_STDINT_H
lib/sm3.h:# if HAVE_OPENSSL_SM3
lib/sm3.h:#    undef HAVE_OPENSSL_SM3
lib/sm3.h:#  if HAVE_OPENSSL_SM3
lib/sm3.h:# if HAVE_OPENSSL_SM3
lib/snan.h:# define HAVE_SNANF 1
lib/snan.h:# define HAVE_SNAND 1
lib/snan.h:   * if HAVE_SAME_LONG_DOUBLE_AS_DOUBLE:
lib/snan.h:# define HAVE_SNANL 1
lib/snan.h:   CC="gcc -mfpmath=387", if HAVE_SAME_LONG_DOUBLE_AS_DOUBLE is 1, 
this
lib/stack-trace-impl.h:#if HAVE_LIBBACKTRACE
lib/stack-trace-impl.h:#elif HAVE_LIBASAN
lib/stack-trace-impl.h:#elif HAVE_EXECINFO_H
lib/stackvma.h:# define HAVE_STACKVMA 1
lib/stat-size.h:#if HAVE_SYS_PARAM_H
lib/stat-size.h:#ifndef HAVE_STRUCT_STAT_ST_BLOCKS
lib/stat-time.h:   _GL_ATTRIBUTE_PURE, HAVE_STRUCT_STAT_*.  */
lib/stat-time.h:#if _GL_WINDOWS_STAT_TIMESPEC || defined 
HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC
lib/stat-time.h:#elif defined HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC
lib/stat-time.h:#elif defined HAVE_STRUCT_STAT_ST_ATIMENSEC
lib/stat-time.h:#elif defined HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC
lib/stat-time.h:# if defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC
lib/stat-time.h:# elif defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC
lib/stat-time.h:#if (defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC \
lib/stat-time.h:     || defined HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC)
lib/stat-time.h:#elif defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC
lib/stat-time.h:#if (defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC \
lib/stat-time.h:     || defined HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC \
lib/stat-time.h:     || defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC)
lib/striconveh.h:#if HAVE_ICONV
lib/striconveh.h:#if HAVE_ICONV
lib/striconv.h:#if HAVE_ICONV
lib/striconv.h:#if HAVE_ICONV
lib/string-desc.h:# define HAVE_STATEMENT_EXPRESSIONS 1
lib/string-desc.h:# define HAVE__GENERIC 1
lib/string-desc.h:# define HAVE_TYPEOF 1
lib/string-desc.h:# define HAVE_BUILTIN_CHOOSE_EXPR 1
lib/string-desc.h:# define HAVE_BUILTIN_CONSTANT_P 1
lib/string-desc.h:#if HAVE_STATEMENT_EXPRESSIONS && HAVE__GENERIC && 
HAVE_TYPEOF \
lib/string-desc.h:    && HAVE_BUILTIN_CHOOSE_EXPR && HAVE_BUILTIN_CONSTANT_P
lib/string-desc.h:# define HAVE_RW_STRING_DESC 1
lib/string-desc.h:#if HAVE_RW_STRING_DESC
lib/string-desc.h:#if HAVE_RW_STRING_DESC
lib/string-desc.h:#if HAVE_RW_STRING_DESC
lib/string-desc.h:#if HAVE_RW_STRING_DESC
lib/string-desc.h:#if HAVE_RW_STRING_DESC
lib/string-desc.h:#if HAVE_RW_STRING_DESC
lib/string-desc.h:#if HAVE_RW_STRING_DESC
lib/string-desc.h:#if HAVE_RW_STRING_DESC
lib/string-desc.h:#if HAVE_RW_STRING_DESC
lib/string-desc.h:#if HAVE_RW_STRING_DESC
lib/string-desc.h:#if HAVE_RW_STRING_DESC
lib/string-desc.h:#if HAVE_RW_STRING_DESC
lib/string-desc.h:#if HAVE_RW_STRING_DESC
lib/string-desc.h:#if HAVE_RW_STRING_DESC
lib/string-desc.h:#if HAVE_RW_STRING_DESC
lib/string-desc.h:#if HAVE_RW_STRING_DESC
lib/string-desc.h:#if HAVE_RW_STRING_DESC
lib/string-desc.h:#if HAVE_RW_STRING_DESC
lib/string-desc.h:#if HAVE_RW_STRING_DESC
lib/string-desc.h:#if HAVE_RW_STRING_DESC
lib/string-desc.h:#if HAVE_RW_STRING_DESC
lib/string-desc.h:#if HAVE_RW_STRING_DESC
lib/sys_un.in.h:   not be defined.  You may use HAVE_UNIXSOCKET after including 
<config.h>.  */
lib/termcap.h:#if HAVE_TERMCAP
lib/termcap.h:#if HAVE_TERMINFO
lib/termcap.h:#if HAVE_TPARAM
lib/termcap.h:#if HAVE_TERMCAP || HAVE_TERMINFO
lib/terminfo.h:#if HAVE_TERMINFO
lib/terminfo.h:#elif HAVE_TERMCAP
lib/terminfo.h:#if HAVE_TPARAM
lib/terminfo.h:#if HAVE_TERMINFO || HAVE_TERMCAP
lib/term-style-control.h:  #if HAVE_TCGETATTR
lib/textstyle.in.h:   libtextstyle, with very few occurrences of '#if 
HAVE_LIBTEXTSTYLE'.
lib/textstyle.in.h:#if HAVE_TCDRAIN
lib/textstyle.in.h:          #if HAVE_TCDRAIN
lib/thread-optim.h:#if HAVE_SYS_SINGLE_THREADED_H /* glibc >= 2.32 */
lib/thread-optim.h:       && HAVE_LINK_H \
lib/thread-optim.h:       && HAVE_DL_ITERATE_PHDR /* not Solaris 10, not Haiku 
*/ \
lib/to_l-impl.h:#if HAVE_WINDOWS_LOCALE_T
lib/to_l-impl.h:# if HAVE_WORKING_USELOCALE
lib/to_l-impl.h:# if HAVE_WORKING_USELOCALE
lib/unistr.in.h:#if GNULIB_UNISTR_U8_MBTOUC_UNSAFE || HAVE_LIBUNISTRING
lib/unistr.in.h:#if GNULIB_UNISTR_U16_MBTOUC_UNSAFE || HAVE_LIBUNISTRING
lib/unistr.in.h:#if GNULIB_UNISTR_U32_MBTOUC_UNSAFE || HAVE_LIBUNISTRING
lib/unistr.in.h:#if GNULIB_UNISTR_U8_MBTOUC || HAVE_LIBUNISTRING
lib/unistr.in.h:#if GNULIB_UNISTR_U16_MBTOUC || HAVE_LIBUNISTRING
lib/unistr.in.h:#if GNULIB_UNISTR_U32_MBTOUC || HAVE_LIBUNISTRING
lib/unistr.in.h:#if GNULIB_UNISTR_U8_MBTOUCR || HAVE_LIBUNISTRING
lib/unistr.in.h:#if GNULIB_UNISTR_U16_MBTOUCR || HAVE_LIBUNISTRING
lib/unistr.in.h:#if GNULIB_UNISTR_U32_MBTOUCR || HAVE_LIBUNISTRING
lib/unistr.in.h:#if GNULIB_UNISTR_U8_UCTOMB || HAVE_LIBUNISTRING
lib/unistr.in.h:#if GNULIB_UNISTR_U16_UCTOMB || HAVE_LIBUNISTRING
lib/unistr.in.h:#if GNULIB_UNISTR_U32_UCTOMB || HAVE_LIBUNISTRING
lib/unlocked-io.h:# if HAVE_DECL_CLEARERR_UNLOCKED || defined clearerr_unlocked
lib/unlocked-io.h:# if HAVE_DECL_FEOF_UNLOCKED || defined feof_unlocked
lib/unlocked-io.h:# if HAVE_DECL_FERROR_UNLOCKED || defined ferror_unlocked
lib/unlocked-io.h:# if HAVE_DECL_FFLUSH_UNLOCKED || defined fflush_unlocked
lib/unlocked-io.h:# if HAVE_DECL_FGETS_UNLOCKED || defined fgets_unlocked
lib/unlocked-io.h:# if HAVE_DECL_FILENO_UNLOCKED || defined fileno_unlocked
lib/unlocked-io.h:# if HAVE_DECL_FPUTC_UNLOCKED || defined fputc_unlocked
lib/unlocked-io.h:# if HAVE_DECL_FPUTS_UNLOCKED || defined fputs_unlocked
lib/unlocked-io.h:# if HAVE_DECL_FREAD_UNLOCKED || defined fread_unlocked
lib/unlocked-io.h:# if HAVE_DECL_FWRITE_UNLOCKED || defined fwrite_unlocked
lib/unlocked-io.h:# if HAVE_DECL_GETC_UNLOCKED || defined getc_unlocked
lib/unlocked-io.h:# if HAVE_DECL_GETCHAR_UNLOCKED || defined getchar_unlocked
lib/unlocked-io.h:# if HAVE_DECL_PUTC_UNLOCKED || defined putc_unlocked
lib/unlocked-io.h:# if HAVE_DECL_PUTCHAR_UNLOCKED || defined putchar_unlocked
lib/utimens.h:#if HAVE_UTIMENS || HAVE_LUTIMENS
lib/utimens.h:#if HAVE_UTIMENS
lib/utimens.h:#if HAVE_LUTIMENS
lib/vma-iter.h:#if defined __linux__ || defined __ANDROID__ || defined 
__gnu_hurd__ || defined __FreeBSD_kernel__ || defined __FreeBSD__ || defined 
__DragonFly__ || defined __NetBSD__ || defined _AIX || defined __sun || 
HAVE_PSTAT_GETPROCVM || (defined __APPLE__ && defined __MACH__) || defined 
_WIN32 || defined __CYGWIN__ || defined __BEOS__ || defined __HAIKU__ || 
defined __minix || HAVE_MQUERY
lib/wprintf-parse.h:#if HAVE_FEATURES_H
lib/xmalloca.h:   _GL_ATTRIBUTE_MALLOC, _GL_ATTRIBUTE_RETURNS_NONNULL, 
HAVE_ALLOCA.  */
lib/xmalloca.h:#if HAVE_ALLOCA
lib/xmalloca.h:#if HAVE_ALLOCA
lib/xsize.h:#if HAVE_STDINT_H
lib/xstriconveh.h:#if HAVE_ICONV
lib/xstriconv.h:#if HAVE_ICONV
lib/xstriconv.h:#if HAVE_ICONV
lib/xstring-desc.h:#if HAVE_RW_STRING_DESC

From this list and from the list of gnulib modules that GRUB imports [1]
it seems that you are just lucky: The only reason that you don't get a warning
from
  lib/mbswidth.h:#if HAVE_DECL_MBSWIDTH_IN_WCHAR_H
is that HAVE_DECL_MBSWIDTH_IN_WCHAR_H is always defined (to 0 or to 1).

> I think I agree you don’t need to update all of Gnulib to deal with Wundef,
> maybe just this case.

Hmm, I'm undecided. Yes, currently it appears that the warning locations you
reported are the only ones. But as soon as you add more modules to
bootstrap.conf, you would likely get some -Wundef warnings.
So, I'm not sure I should encourage you to use an approach that is likely
to break in the long term.

Bruno

[1] 
https://gitlab.freedesktop.org/gnu-grub/grub/-/blob/master/bootstrap.conf?ref_type=heads




Reply via email to