On Thu, Aug 3, 2023 at 11:52 AM Tim Rühsen <tim.rueh...@gmx.de> wrote: > > I just updated gnulib and recognized these warnings with every '#include > <config.h>'. Before the update there were no warnings. > > ../config.h:3317:34: warning: "__cplusplus" is not defined, evaluates to > 0 [-Wundef] > [...] > Disabling -Wundef for the whole project is not my preferred solution =). > Using a #pragma around the #include is ugly and tedious (too many files > to change). > > Can this be fixed in gnulib ?
My personal opinion is, there's nothing to fix. That is exactly how macros are supposed to work. Anything undefined evaluates to 0. It has been that way since the early days of C and C++. If there's a fix, then it is that you don't use -Wundef. Jeff