Article View: comp.std.c
Article #2044Re: #pragma
From: Karl Heuer
Date: Wed, 05 Dec 1990 17:51
Date: Wed, 05 Dec 1990 17:51
21 lines
1518 bytes
1518 bytes
In article <9012050330.AA04857@decpa.pa.dec.com> diamond@tkou02.enet.dec.com ("diamond@tkovoa") writes:
>In that case, why should unrecognized #pragmas be ignored?
I agree that this was a bad idea.
>[Is it okay to produce a diagnostic?]
There are two available loopholes. One is to say "there are no unrecognized
#pragma directives for us to ignore, because our implementation interprets all
forms of #pragma as a valid request to terminate the compilation." This is
what gcc used to do (with embellishments that some found amusing), but the FSF
was pressured to change this. (I rather liked it.)
The other approach is to emit the diagnostic "warning: unrecognized #pragma"
and continue compilation. This is completely legal (as are all warnings%),
and I consider such an implementation to be higher quality than one which does
not do so.
Karl W. Z. Heuer (karl@ima.isc.com or uunet!ima!karl), The Walking Lint
________
% including such things as "comment does not match code" :-)
Technical Details
Message-ID:
<1990Dec05.175141.10264@dirtydog.ima.isc.com>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!peregrine!elroy.jpl.nasa.gov!swrinde!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!att!ima!dirtydog!karlReferences:
<9012050330.AA04857@decpa.pa.dec.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!peregrine!elroy.jpl.nasa.gov!swrinde!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!att!ima!dirtydog!karl From: karl@ima.isc.com (Karl Heuer) Newsgroups: comp.std.c Subject: Re: #pragma Message-ID: <1990Dec05.175141.10264@dirtydog.ima.isc.com> Date: 5 Dec 90 17:51:41 GMT References: <9012050330.AA04857@decpa.pa.dec.com> Sender: news@dirtydog.ima.isc.com (NEWS ADMIN) Reply-To: karl@ima.isc.com (Karl Heuer) Organization: Interactive Systems Lines: 21