Date: Thu, 08 Nov 2001 01:39:57 -0700 From: Warner Losh <imp@harmony.village.org> To: Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de> Cc: Cyrille Lefevre <clefevre@citeweb.net>, freebsd-current@FreeBSD.ORG Subject: Re: malloc.h Message-ID: <200111080839.fA88dv740802@harmony.village.org> In-Reply-To: Your message of "Thu, 08 Nov 2001 07:50:21 %2B0100." <20011108075021.P43204@uriah.heep.sax.de> References: <20011108075021.P43204@uriah.heep.sax.de> <200111072045.fA7KjLP70989@uriah.heep.sax.de> <200111080020.fA80Kpd99323@gits.dyndns.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <20011108075021.P43204@uriah.heep.sax.de> Joerg Wunsch writes: : > #if (__STDC__-0) == 0 : : What is the difference to my version (except that it would fail for : __STDC__ being greater than 1)? I don't know how pre-ANSI cpps did : behave, but at least a standard-conformant cpp must replace any : identifier in an #if statement that remains after macro expansion by : 0L. It isn't different. Some people like to #define TRUE (1 == 1) too, which is bogus, imho. They like to trot out the fact that some whacked out compiler from the 1980's or earlier defined TRUE to be 255 or something like that. :-). I wouldn't worry about it #if __STDC__ is exactly right. Older, pre ANSI cpp would treat this correctly, unless they were very very very old and didn't have the #if directive, but only the #ifdef directive. That's so old, I've never seen one, but rumors about their existitance filled comp.lang.c in 1985-1989 when I still had time for netnews. Older cpp did what ansi enshrined as the standard in this respect. Except they might have treated a symbol not defined as 0, which is a suble difference, but doesn't matter here. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200111080839.fA88dv740802>