[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: use of __STDC__ in libtool.m4 on HEAD
From: |
Tim Mooney |
Subject: |
Re: use of __STDC__ in libtool.m4 on HEAD |
Date: |
Sun, 23 Sep 2001 18:08:01 -0500 (CDT) |
In regard to: Re: use of __STDC__ in libtool.m4 on HEAD, Gary V. Vaughan...:
>> Why? Some C compilers define __STDC__ but don't define it to 1. How
>> about:
>> #ifdef __STDC__
>
>I believe there are compilers out there that define __STDC__ to 0
>for strict K&R mode and to 1 for strict ANSI mode. If memory srves,
>OSF compilers used to this -- at least in the 3.2 series...
No, __STDC__ defined to 0 means ANSI + extensions for at least the
recent Tru64 compiler (and I think that behavior goes back quite far).
The Sun FORTE compiler does the same thing if given either the `-Xa' or
`-Xt' option (ANSI+ or ANSI transitional, accordingly).
If anyone is defining __STDC__ as anything in strict K&R mode, it's a bug in
the compiler. __STDC__ should never be defined for K&R (only).
>How about:
>
>#if defined (__STDC__) && !__STDC__
What happens if __STDC__ is 1 (as it should be for strict ANSI
conformance)?
I think Albert's suggestion of dropping the && ... is the right one.
Tim
--
Tim Mooney address@hidden
Information Technology Services (701) 231-1076 (Voice)
Room 242-J6, IACC Building (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164