misc/56206: src/sys/sys/cdefs.h uses PreProcessor variables
that aren't defined, causing noisy warnings.
Larry Rosenman
ler at lerctr.org
Sat Aug 30 13:40:23 PDT 2003
The following reply was made to PR misc/56206; it has been noted by GNATS.
From: Larry Rosenman <ler at lerctr.org>
To: Garrett Wollman <wollman at khavrinen.lcs.mit.edu>
Cc: FreeBSD-gnats-submit at freebsd.org
Subject: Re: misc/56206: src/sys/sys/cdefs.h uses PreProcessor variables
that aren't defined, causing noisy warnings.
Date: Sat, 30 Aug 2003 15:33:56 -0500
--On Saturday, August 30, 2003 16:26:52 -0400 Garrett Wollman
<wollman at khavrinen.lcs.mit.edu> wrote:
>
>>>> -#if __STDC_VERSION__ < 199901
>>>> +#if defined(__STDC_VERSION__) && __STDC_VERSION__ < 199901
>>>
>>> 0 < 199901
>> and doesn't the #if __STDC_VERSION__ < 199901 have the same effect,
>> except
>
> Let me try to spell this out.
>
> When __STDC_VERSION__ is not defined, the preprocessor expression
> `__STDC_VERSION < 199901' evaluates, by definition, to true, because
> 0L < 199901L (which is why I consider this GCC warning to be bogus).
>
> When __STDC_VERSION__ is not defined, the preprocessor expression
> `defined(__STDC_VERSION__) && __STDC_VERSION__ < 199901' evaluates to
> false, because __STDC_VERSION__ is not defined.
aha. I think I agree with you on the Warning.
Thanks for the explanation.
LER
--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: ler at lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749
More information about the freebsd-bugs
mailing list