Article View: comp.std.c++
Article #3453Re: #warning
From: Steve Clamage
Date: Wed, 14 Feb 1996 19:36
Date: Wed, 14 Feb 1996 19:36
33 lines
2324 bytes
2324 bytes
In article 270631188wnr@pires.co.uk, Martin Bonner <mbonner@pires.co.uk> writes: >Following up from the discussion of "#if XXXX", is there >any chance of getting "#warning" into the standard? Or is it >too late > >It would be useful. >It would be easy to implement. >It would achieve something that cannot be achieved in any other way. > >(Have I forgotten anything?) Yes, you forgot to say how it differs from #error, which is already in the draft (and in Standard C). The description of #error says only that it "causes the implementation to produce a diagnostic message that includes the specified sequence of preprocessing tokens." I suspect you have in mind that somehow #error would halt compilation and #warning would not, but we don't get to talk about those things in the standard. There needn't be a separate compilation stage, for example, and an implementation is not required to differentiate between "compile time" and "run time". Consider a pure interpreter that seems to execute source code directly, or a "just-in-time" system that compiles a module or part of a module on the fly the first time it is referenced. The standard describes valid source-language constructs and the effect they have in an executing program. Details of compiler behavior cannot reasonably be discussed without placing undesirable constraints on implementations. --- Steve Clamage, stephen.clamage@eng.sun.com --- [ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu. Contact address: std-c++-request@ncar.ucar.edu. The moderation policy is in http://reality.sgi.com/employees/austern_mti/std-c++/policy.html. ]
Technical Details
Message-ID:
<4ftd0p$c5s@engnews1.Eng.Sun.COM>Path:
arc1-ca.pugleaf.net!chronicle.mti.sgi.com!austernReferences:
<270631188wnr@pires.co.uk>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!chronicle.mti.sgi.com!austern From: clamage@Eng.Sun.COM (Steve Clamage) Newsgroups: comp.std.c++ Subject: Re: #warning Date: 14 Feb 1996 11:36:50 PST Organization: Sun Microsystems Inc. Approved: austern@isolde.mti.sgi.com Message-ID: <4ftd0p$c5s@engnews1.Eng.Sun.COM> References: <270631188wnr@pires.co.uk> Reply-To: clamage@Eng.Sun.COM NNTP-Posting-Host: isolde.mti.sgi.com X-Original-Date: 14 Feb 1996 19:26:17 GMT X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBVAwUBMSI59Uy4NqrwXLNJAQFy6wH9FAaJf5s95wrVCC+kYTr8YJOQ3U7A2iuU A1SmRHI9wQgfajiu/qvsJqqC3lg7lJ9NaP6VKYpee4Kg/gEqCgIpKg== =ppMK Originator: austern@isolde.mti.sgi.com