Article View: comp.std.c++
Article #2822Re: Undefined #pragmas are evil
From: Jerry Coffin
Date: Mon, 04 Dec 1995 16:29
Date: Mon, 04 Dec 1995 16:29
30 lines
1802 bytes
1802 bytes
clamage@Eng.Sun.COM (Steve Clamage) wrote:
[ mention of requiring unrecognized #pragmas to be errors elided... ]
>IMHO, pragmas should be reserved for things like turning error reporting
>or optimizations on and off. That is, things that don't (necessarily)
>affect program correctness, but convenience, efficiency, and the like.
>More significant pragmas might have a place in special-purpose compilers,
>such as for embedded systems, where programs are inherently unportable.
IMO, the real problem is that pragmas are allowed to do almost anything
- I haven't checked the DWP on it, but the C standard simply specifies
that they cause the program to act in an implementation defined manner,
with no limitations.
IMO, a pragma should be required to have no effect detectable by a
strictly conforming program.
Later,
Jerry.
/* I can barely express my own opinions; I certainly can't
* express anybody else's.
*
* The universe is a figment of its own imagination.
*/
[ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu.
Contact address: std-c++-request@ncar.ucar.edu. The moderation policy
is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID:
<49psdf$gu@natasha.rmii.com>Path:
arc1-ca.pugleaf.net!engnews2.Eng.Sun.COM!taumet!clamageReferences:
<sourceDIwJ2M.3DL@netcom.com> <49nbn6$mr5@engnews1.eng.sun.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!engnews2.Eng.Sun.COM!taumet!clamage From: jcoffin@rmii.com (Jerry Coffin) Newsgroups: comp.std.c++ Subject: Re: Undefined #pragmas are evil Date: 4 Dec 1995 16:29:25 GMT Organization: TAEUS Approved: clamage@eng.sun.com (comp.std.c++) Message-ID: <49psdf$gu@natasha.rmii.com> References: <sourceDIwJ2M.3DL@netcom.com> <49nbn6$mr5@engnews1.eng.sun.com> NNTP-Posting-Host: taumet.eng.sun.com Content-Type: text X-Nntp-Posting-Host: slip8164.rmii.com X-Newsreader: Forte Free Agent 1.0.82 Content-Length: 985 X-Lines: 26 Originator: clamage@taumet