Why does C standard consider each compiler flag a separate implementation?

Dr. T. Andrews tanner at ki4pv.uucp
Fri Jun 17 12:49:32 AEST 1988


In article <1543 at se-sd.sandiego.NCR.COM>, rns at se-sd.sandiego.NCR.COM (Rick Schubert) writes:
) ...  For example, the compiler may have > something similar to:
)	[ strcmp(*argv,"-x") ? compiler1() : compiler2() ]
) This is an extreme example ...

I wouldn't call it a particularly extreme example.  You get a
different compiler (including different parser) under SCO xenix
on the iAEC-386 if you ask for 16-bit code.  This is done with a
command line switch ("-M0", "-M1", "-M2").

You can also get a different linker by adding "-dos" to your
command line.

I think, therefore, that it is reasonable to consider different
command line options to give potentially different implementations.
Sometimes they do!
-- 
rutgers!bpa!cdin-1!cdis-1!ki4pv!tanner  (better than it looks!)
or...  {allegra codas killer decvax!ucf-cs}!ki4pv!tanner



More information about the Comp.lang.c mailing list