🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #5649

Re: #pragma

#5649
From: Colin Plumb
Date: Sat, 21 Jan 1989 00:09
22 lines
1380 bytes
dlm@cuuxb.UUCP (Dennis L. Mumaugh) wrote:
> Finally, some one has explained the use of pragma!!
> 
> In each of the cases the program itself will not change behavior,
> but the object file could be larger or the program could run slower.
> 
> The pragma
> 	#pragma inline
> could mimic the C++ inline function construct and is technically legal
> but gives me a bit of a qualm.

Actually, it's still fine.  The rule is (roughly) that deleting all #pragma
lines from the source should not affect the operation of the resultant
executable.

One of the worst offenses I've yet seen was a compiler that "ANSIfied"
its #asm/#endasm by renaming them #pragma asm and #pragma endasm.  Sorry,
you should have left them alone.  The compiler still would have been
conforming, but another compiler would have been able to barf in the
right place.
-- 
	-Colin (uunet!microsof!w-colinp)
Technical Details
Message-ID: <316@microsoft.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!ncis.llnl.gov!helios.ee.lbl.gov!nosc!ucsd!rutgers!mailrus!cornell!uw-beaver!microsoft!w-colinp
References: <8770@bloom-beacon.MIT.EDU> <12570002@hpclwjm.HP.COM> <9430@smoke.BRL.MIL> <2389@cuuxb.ATT.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!ncis.llnl.gov!helios.ee.lbl.gov!nosc!ucsd!rutgers!mailrus!cornell!uw-beaver!microsoft!w-colinp
From: w-colinp@microsoft.UUCP (Colin Plumb)
Newsgroups: comp.std.c
Subject: Re: #pragma
Message-ID: <316@microsoft.UUCP>
Date: 21 Jan 89 00:09:21 GMT
References: <8770@bloom-beacon.MIT.EDU> <12570002@hpclwjm.HP.COM> <9430@smoke.BRL.MIL> <2389@cuuxb.ATT.COM>
Reply-To: w-colinp@microsoft.uucp (Colin Plumb)
Organization: very little
Lines: 22