Machine specific predefined names

Alan Mycroft am at cl.cam.ac.uk
Tue Mar 1 21:59:11 AEST 1988


In article <1988Feb21.015424.20436 at utzoo.uucp> henry at utzoo.uucp (Henry Spencer) writes:
>> 2) If so, will companies such as SUN, AT&T, DEC etc. predefine
>>    names such as _Sparc, _U3b2, _Vax in their ANSII C compilers?
>
>Probably.
>
It would probably make a great deal of sense if the dpANS rationale
would SUGGEST formats for these things to be encoded.
For example, an indication that __cc_*, __mc_*, __os_*
might specify respectively compiler, machine, operating system
would be very helpful both for knowing what sort of names to look for
(and for making code easier to read) and a good guide to implementors:
E.g. On the xyzzy system we might have predefined
  __cc_gnu  __mc_m68000  __os_unix
This would be a much better alternative than the present trend which seems to
be that compilers continue to predefine "unix", "m68000" and the like
(and so be non-conforming)
and then provide a switch (-Uunix -Um68000) to give an ANSI compiler!!!



More information about the Comp.lang.c mailing list