Path: utzoo!mnetor!uunet!husc6!rutgers!princeton!phoenix!rjchen From: rjchen@phoenix.Princeton.EDU (Raymond Juimong Chen) Newsgroups: comp.lang.c Subject: Re: Pragmas Message-ID: <1426@phoenix.Princeton.EDU> Date: 2 Jan 88 22:24:13 GMT References: <8801021358.AA15890@decwrl.dec.com> Reply-To: rjchen@phoenix.Princeton.EDU (Raymond Chen) Organization: Princeton University, NJ Lines: 27 Summary: Why not just flag it as a warning? In a famous article, minow@thundr.dec.com (Martin Minow) said: >According to the Draft Standard, unknown pragmas are to be ignored >(section 3.8.6 of the Aug. '87 draft). Because it doesn't distinguish >mistakes from typographical errors, this is a mistake, and one that the >Committee seems inordinately fond of: they rejected my request to >flag unknown pragmas as errors. Why not flag unknown #pragmas as warnings? This would allow files to be compiled, while letting the user know that something may be amiss. If the user sees things like warning: unknown pragma directive: memory_model warning: unknown pragma directive: asm warning: unknown pragma directive: mispelled s/he can take appropriate action for each one. (The first can probably be ignored safely; the second will cause hair to be pulled out; the third is the kind of thing we need to catch lest our next spacecraft land in a rock garden instead of a flat surface.) Also, has dpANS (or however you capitalize it) made any attempts at standardizing #pragmas? To the extent of "If your compiler accepts #pragma sneeze, then the sneeze option must mean the following: ...", I mean. Is this a good idea? Is it practical? -- Raymond Chen UUCP: ...allegra!princeton!{pucc|phoenix}!rjchen BITNET: 6101695@pucc, rjchen@pucc ARPA: rjchen@pucc.PRINCETON.EDU "Say something, please! ('Yes' would be best.)" - The Doctor