Path: utzoo!attcan!uunet!lll-winken!ncis.llnl.gov!ncis!helios.ee.lbl.gov!pasteur!ucbvax!decwrl!labrea!rutgers!cmcl2!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn ) Newsgroups: comp.std.c Subject: Re: __STDC__ and non-conforming ANSI C compilers Message-ID: <9437@smoke.BRL.MIL> Date: 19 Jan 89 14:22:23 GMT References: <9369@smoke.BRL.MIL> <2788@mhres.mh.nl> <9392@smoke.BRL.MIL> <9416@smoke.BRL.MIL> <2797@ficc.uu.net> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 26 In article <2797@ficc.uu.net> peter@ficc.uu.net (Peter da Silva) writes: >By the by, some people are claiming that putting '-DFOO' on the command >line makes the compiler non-conforming. Doesn't that make __STDC__ >pretty useless? Have you looked at the news sources, lately? I think I was the one who first advanced that argument; however I now think that it isn't necessary to enforce that. It all depends on whether you consider such an invocation of the compiler to make the IMPLEMENTATION or the APPLICATION the definer of the symbol. Technically by the ANSI C spec there is no alternative but to consider this a definition by the implementation. However, if "cc -c -DFOO source.c" is viewed as a convenient abbreviation for essentially echo '0a/#define FOO 1\n/\nw\nq' | sam -d source.c cc -c source.c echo '1d' | sam -d source.c then it could be claimed to be an application definition. That's kind of cheating, but it's an undoubted convenience so it would be reasonable to take that approach. >> X3J11 decided not to authorize official "levels" of conformance >> to the Standard; >I suspect this is a mistake. I don't think so. Languages that HAVE had "levels" have shown that having them is a mistake.