tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Bogus ifdef guard in sys/null.h



On Sun, Jul 18, 2010 at 03:04:15AM +0000, Valeriy E. Ushakov wrote:
> Joerg Sonnenberger <joerg%britannica.bec.de@localhost> wrote:
> 
> > On Sat, Jul 17, 2010 at 08:20:45PM +0000, Valeriy E. Ushakov wrote:
> >> I read [#3] to mean that you shouldn't #undef only "identifiers that
> >> begin with an underscore and either an uppercase letter or another
> >> underscore" (the first item in the list in [#1]), and that it doesn't
> >> cover all items from the list.
> > 
> > Yes, that part doesn't apply. The only other part that talks about
> > #undef of macros is if they have functions as backing. E.g. isalpha().
> > So from my reading of the standard, it is simply unspecified.
> 
> Why is it unspecified?  You cannot #undef reserved identifiers, like
> _FOO (typical multiple-inclusion guards fall under this) or __foo.
> Anything else - why not?

NULL is not reserved, so this complete block doesn't apply. The only
other place where C99 defines behavior for #undef of macros defined by
system header is when talks about the macro/function dualism. In that
case the intention seems to be strongly that "if I #undef the macro, I
mean it".

Joerg


Home | Main Index | Thread Index | Old Index