Path: utzoo!mnetor!uunet!mcvax!ukc!eagle!icdoc!cam-cl!am From: am@cl.cam.ac.uk (Alan Mycroft) Newsgroups: comp.lang.c Subject: Re: Machine specific predefined names Message-ID: <1139@jenny.cl.cam.ac.uk> Date: 1 Mar 88 11:59:11 GMT References: <1988Feb17.115402.12739@light.uucp> <1988Feb21.015424.20436@utzoo.uucp> Reply-To: am@cl.cam.ac.uk (Alan Mycroft) Organization: U of Cambridge Comp Lab, UK Lines: 18 In article <1988Feb21.015424.20436@utzoo.uucp> henry@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!!!