code break wrote On 03/24/06 09:13,:
Plz can any one tell methe actual use of Pragma directives in C &
googled for it but i'm not able to understand it clearly so can any
one tell me it's actual use in C..
There is no Pragma directive in C. You are probably
thinking of the _Pragma directive.
_Pragma is a "standard way of being non-standard."
You use _Pragma to tell the compiler something that the
C language itself cannot express: things like "This
function never returns" or "This function has no side-
effects" or "Align this variable on a 8192-byte boundary."
The things that can be expressed and the exact way you
express them are implementation-defined, meaning that
they vary from one compiler to the next.
_Pragma (and #pragma, which does the same sort of
thing but with different syntax) has two effects on your
code. First and most obviously, it has the special effect
that the compiler documents for it. Second and more subtly,
it ties your code to that particular compiler, making it
exceedingly difficult to move your code to another -- you
will sometimes even find that you cannot upgrade to a
newer version of "the same" compiler without changing the
meaning of the _Pragma and #pragma directives in your code.
Because of the portability problems, _Pragma and
#pragma should be used only when there is no other practical
way to solve the problem at hand. But if you find yourself
in that situation, _Pragma and #pragma may be your only
recourse: necessity is a spur that is hard to ignore.