CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2002
    Posts
    72

    A Question about "__STDC__ ".

    Hi, everyone!

    I wondered where the variable __STDC__ is defined.
    I write a simple C program to test it, before include
    other .h files, the variable is already defined.
    (I use #ifdef to test the existence)

    I have two question about the variable:

    1. Where is the variable defined?

    2. What is the function of the variable?


    Cheers,
    George

  2. #2
    Join Date
    Jun 2002
    Location
    Letchworth, UK
    Posts
    1,020
    1) __STDC__ is normally defined in a compiler option. For VC++ it will be something like /Za or /Ze.

    2) It is used to disable vendor extensions like interrupt or asm. If you are in that mode, the code should be portable across systems.
    Succinct is verbose for terse

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured