Standard identification of compilers?

David S. Masterson cimshop!davidm at uunet.UU.NET
Tue May 7 02:57:20 AEST 1991


Does the proposed standard (C or C++) have a way of identifying whose compiler
is being used?  I know its bad form to build code specific to a compiler when
that compiler conforms to a standard, but it seems that every compiler has its
little quirks that are specific to it.  What I was wondering was if one could:

	#if (__COMPILER__ == "BC++ v2.02")
		...
	#endif

That way, *if you have to*, you could gear your code to a quirk.  Is there a
standard for this?  If not, why not?
--
====================================================================
David Masterson					Consilium, Inc.
(415) 691-6311					640 Clyde Ct.
uunet!cimshop!davidm				Mtn. View, CA  94043
====================================================================
"If someone thinks they know what I said, then I didn't say it!"



More information about the Comp.std.c mailing list