[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#4948) #if/#elif argument in .../include/ac/time.h



I wrote:
> That said, it's indeed a reasonable cleanup.  I'll do that and some
> others shortly.

Fixed in the cvs HEAD version.

There are a few cases left though - in particular, do anyone know if
#if DOS/MACOS/HAVE_WINSOCK can be replaced with #ifdef?  I'm not touching
them without word from someone who knows OpenLDAP on these platforms.

Besides, I still don't know if the "issues" you refer to are just
compiler warnings, or errors - or if the one macro you reported was a
special case.  So while allowing -Wundef to catch macro typos is
worthwhile, I likely won't do anything more unless I hear a reason to.

And I'd like to know what Plan 9 C says about this program:

> BTW, will 9 C accept this (when you do not define FOO/BAR)?  What
> error/warning messages, if any?
> 
> #if defined(FOO) && FOO  /* Guard #if FOO with defined(FOO) */
> int main() { return 2; }
> #elif BAR
> int main() { return 1; }
> #else
> int main() { return 0; }
> #endif

-- 
Regards,
Hallvard