__STDC__ and non-conforming ANSI C compilers
Mark Nagel
nagel at paris.ics.uci.edu
Sun Jan 22 10:45:17 AEST 1989
In article <406 at jhereg.Jhereg.MN.ORG>, mark at jhereg (Mark H. Colburn) writes:
|
|The problem that others (such as Doug Gwyn) are looking at is does it
|really understand all of the things that you mentioned, such as function
|prototypes, #, ##, unary plus, etc.? What if it just understands function
|prototypes, const, volatile and forward structure references? I would bet
|there there are going to be vendors out there that decide that that is
|going to be good enough to define __STDC__. As a developer, I'm going to
|be very annoyed when my "maximally portable application" is compiled on
|their system and fails due to a syntax error when it encounters a unary
|plus.
This is what I don't understand -- why should *you* be annoyed because
your conforming program fails to compile on a fake ANSI
implementation? For years now we've heard "if it does/doesn't do so
and so, then it ain't a C compiler." Along with this was the implicit
message that the compiler should be replaced with one that *is*
conforming. Why can't it be the same now? I realize that for some
people, there is only one choice. But in general, it should be
possible to simply avoid purchasing/using a compiler that is broken in
favor of one that is capable of compiling conforming programs. Why
should users adjust for the compiler writers' benefit?
|Basically, what I think (I won't speak for any others) is that the only
|system that is close enough to the standard to define __STDC__ is one that
|is fully conformant.
Exactly. So don't even worry about what happens when __STDC__ is
defined when it shouldn't be. That's the compiler customer's problem,
not the program writer's. I know, I know, you're all saying, "Join us
here in the real world, Mark." But this is exactly what the standard
is supposed to do -- give *everyone* the same base of known language
features and capabilities. I have no sympathy for someone who
continues to use a faulty compiler when other choices exist (e.g. Gnu,
when it's done).
Mark Nagel @ UC Irvine, Dept of Info and Comp Sci
ARPA: nagel at ics.uci.edu | The world is coming to an end.
UUCP: {sdcsvax,ucbvax}!ucivax!nagel | Please log off.
More information about the Comp.std.c
mailing list