2010/1/12 Grégoire Sutre <gregoire.su...@gmail.com>: > richardvo...@gmail.com wrote: > >> This fix breaks when ENABLE_NLS is defined as 0. > > AFAICS, in the implementation of AM_GNU_GETTEXT, ENABLE_NLS is either not > defined or set to 1. > > But I agree that my proposed fix is too dependent on the implementation of > AM_GNU_GETTEXT, which may change. > > Another option would be to replace #if ENABLE_NLS by #if defined(ENABLE_NLS) > && ENABLE_NLS.
I know the C compiler short-circuits &&, if the preprocessor does also then this looks like the best solution. If not, then nested #if. > >> This gcc bug is blocking a better solution: >> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38105 > > I didn't know that this was a gcc bug. It felt like a normal behavior to me > to get an error with both -Wundef and -Werror in that case. From the gcc > man page: > > -Werror > Make all warnings into errors. > > -Wundef > Warn if an undefined identifier is evaluated in an #if directive. And -Wno-error=undef is supposed to change the severity of that class of warning back to non-fatal. But it currently doesn't. > > > Grégoire > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel > _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel