pragma directive

Discussion in 'C Programming' started by aleemakhtar1@gmail.com, Jan 28, 2008.

  1. Guest

    wat is use of pragma directive in embedded sys ??
    , Jan 28, 2008
    #1
    1. Advertising

  2. Mark Bluemel Guest

    wrote:
    > wat is use of pragma directive in embedded sys ??


    The "#pragma" preprocessing directive generally controls some
    implementation-specific behaviour. The C99 standard specifies
    3 "STDC" options which can be controlled with "#pragma", but
    otherwise you need to refer to your compiler documentation.
    Mark Bluemel, Jan 28, 2008
    #2
    1. Advertising

  3. santosh Guest

    wrote:

    > wat is use of pragma directive in embedded sys ??


    From n1256:

    6.10.6 Pragma directive
    Semantics

    1 A preprocessing directive of the form

    # pragma pp-tokensopt new-line

    where the preprocessing token STDC does not immediately follow pragma in
    the directive (prior to any macro replacement)152) causes the
    implementation to behave in an implementation-defined manner. The
    behavior might cause translation to fail or cause the
    translator or the resulting program to behave in a non-conforming
    manner. Any such pragma that is not recognized by the implementation is
    ignored.

    2 If the preprocessing token STDC does immediately follow pragma in the
    directive (prior to any macro replacement), then no macro replacement
    is performed on the directive, and the directive shall have one of the
    following forms153) whose meanings are described elsewhere:

    #pragma STDC FP_CONTRACT on-off-switch
    #pragma STDC FENV_ACCESS on-off-switch
    #pragma STDC CX_LIMITED_RANGE on-off-switch

    on-off-switch: one of
    ON OFF DEFAULT
    santosh, Jan 28, 2008
    #3
  4. Army1987 Guest

    wrote:

    > wat is use of pragma directive in embedded sys ??

    It is implementation-defined. [1] If you're interested on a particular
    system, you should look it up on its documentation, and maybe ask in a
    newsgroup about it.

    [1] Except C99's #pragma STDC about floating point environment.


    --
    Army1987 (Replace "NOSPAM" with "email")
    Army1987, Jan 28, 2008
    #4
  5. <> wrote in message
    news:...
    > wat is use of pragma directive in embedded sys ??


    some are:
    -> control over the "section" into which the compiler places the code and/or
    data
    -> control over the "addressing mode" used for accessing the data
    -> control over floating point
    -> control over enabling/disabling of certain optimizations etc
    Ravishankar S, Jan 28, 2008
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    9
    Views:
    13,840
    Rob Dekker
    Jul 21, 2005
  2. ryang
    Replies:
    1
    Views:
    933
    Wes Groleau
    Apr 11, 2005
  3. Titus A Ducksass
    Replies:
    1
    Views:
    6,014
    Sid Ismail
    Aug 1, 2003
  4. risha

    #pragma directive

    risha, Mar 16, 2005, in forum: C Programming
    Replies:
    2
    Views:
    405
    Keith Thompson
    Mar 19, 2005
  5. arunmib

    #pragma dictionary directive in Linux?

    arunmib, Nov 14, 2007, in forum: C Programming
    Replies:
    3
    Views:
    467
    arunmib
    Nov 15, 2007
Loading...

Share This Page