Path: utzoo!utgpu!water!watmath!clyde!rutgers!rochester!bbn!husc6!think!ames!lll-lcc!unisoft!hoptoad!gnu From: gnu@hoptoad.uucp (John Gilmore) Newsgroups: comp.lang.c Subject: Re: Machine specific predefined names Message-ID: <4100@hoptoad.uucp> Date: 21 Feb 88 12:25:30 GMT References: <1988Feb17.115402.12739@light.uucp> <221@sdrc.UUCP> Organization: Nebula Consultants in San Francisco Lines: 40 < 2) If so, will companies such as SUN, AT&T, DEC etc. predefine < names such as _Sparc, _U3b2, _Vax in their ANSII C compilers? < Note that doing so will also force change in some `existing < practices'. scjones@sdrc.UUCP (Larry Jones) wrote: > Hard to say for sure -- most of these companies have stated that they will > provide conforming compilers, but they may just have a switch that gets > rid of all the predefined identifiers rather than change them. (Nothing > says a compiler must be conforming by default!) In general, good companies tend to opt for "not pissing off their existing customer base", and Sun in particular has stated that their product will continue to compile their customers' existing 4.2BSD based code without change, as they slide in Sys V and such. (Of course, buggy code is not always going to port.) I don't think they have made an explicit committment to ANSI C or POSIX. The really relevant statement quoted here is "nothing says a compiler must be conforming by default". GCC is only "fully conforming" if you use the "-ansi" switch (it even enables the loathsome trigraphs), but they don't expect anyone to use the switch. If you really want an error message for everything in your program that wouldn't run on ANSI C, you have to say "-pedantic", which at least can be used sort of like "lint". There is some faint hope that a conforming ANSI C program could get by without #ifdef FOURTEEN_CHAR_FILENAMES and such, but personally I doubt it. There are too many systems with C and not all of them get everything right, even when they agree on right, which most of them don't. As an example, a conforming program probably can't make *any* assumptions about the format of file names... Therefore I doubt many programs will be fully conforming. They will depend on some sort of externally defined names to specify the environment they are to be run in. Some of the more "pedantic" folks might have their Makefiles specify "-D__SYSV_TTYS" but they will probably just do "-DSYSV_TTYS" like they always have. -- {pyramid,ptsfa,amdahl,sun,ihnp4}!hoptoad!gnu gnu@toad.com "Watch me change my world..." -- Liquid Theatre