#pragma

Dennis L. Mumaugh dlm at cuuxb.ATT.COM
Fri Jan 20 09:28:43 AEST 1989


In article <9430 at smoke.BRL.MIL> gwyn at brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>) writes:
>
>Really, #pragma is intended to give advice to the compiler such as:
>	produce a listing
>	optimize this block in a certain way
>	assign this data to a certain kind of storage
>It can undoubtedly be made to do many other things, not all of them
>advisable.

Finally, some one has explained the use of pragma!!

In some compilers there may be
	#pragma ident "string"
to add interesting information into a special place in the object
and a 
	#pragma debug
to cause the compiler to add special symbols for use by the
debugger and
	#pragma optimize off
to tell the optimizer to stop optimizing the code for a while

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.
-- 
=Dennis L. Mumaugh
 Lisle, IL       ...!{att,lll-crg}!cuuxb!dlm  OR cuuxb!dlm at arpa.att.com



More information about the Comp.std.c mailing list