This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: sun/os as release candidate was: Removal of V2 code


On Mon, Nov 20, 2000 at 03:51:34PM -0500, Kaveh R. Ghazi wrote:
>  > From: Robert Lipe <robertlipe@usa.net>
>  > 
>  > Kaveh R. Ghazi wrote:
>  > 
>  > > I've felt SunOS a worthy second tier candidate for these reasons:
>  > > 
>  > > Tests K&R stage1 support
>  > 
>  > Many modern compilers have flags to dumb them down to K&R mode.  Perhaps
>  > this could be accomplished by doing bootstraps with a compiler in such a
>  > mode.  I suspect that "gcc -ansi" is probably not the best test, but it
>  > might suffice.  Some vendor compiler might be a better test.
> 
> I think you meant "gcc -traditional".
> 
> The problem with this kind of testing is that when you tell an ANSI
> compiler to "dumb down" to traditional C, many still accept (some)
> ANSI constructs.  E.g. Irix6's "cc -cckr" or "gcc -traditional" still
> accept prototypes.  I'm sure other obscure things will come up.  I
> think I recall hpux's cc did a good job being really traditional.

You also run into problems with system headers that use ANSI
constructs.  For instance, GNU libc's headers haven't been K+R clean
since the 2.0 release, and in 2.2 they gave up even pretending to
support pre-ANSI.  The headers have bare prototypes, unqualified
"const", use ## unconditionally to paste tokens, etc.  This means gcc
-traditional is unusable on more or less all Linux systems.

If I were in charge of testing K+R compatibility, I'd get a Vax
emulator, install 4.3BSD on it, and set up a build environment inside
there.  That's overkill; 4.3 doesn't even have #elif.  But that means
if GCC works on it, it *will* run on everything that people actually
use in real life.

zw

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]