KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q60255: __STDC__ Is Undefined If Microsoft Extensions Are Allowed

Article: Q60255
Product(s): See article
Version(s): 2.50 2.51
Operating System(s): MS-DOS
Keyword(s): ENDUSER | s_quickasm s_c | mspl13_c
Last Modified: 15-APR-1990

The __STDC__ macro is defined if a C compiler is ANSI C-standard
conforming, and is undefined in QuickC Versions 2.50 and 2.51 if
Microsoft extensions are allowed (default). To allow the macro to be
defined, go to Options.Make.Compiler Flags.C Language and check ANSI
compatibility. If you are compiling from the command line, add the /Za
switch.

This macro may be used as in the following code fragment:

Code Example
------------

#ifdef __STDC__
  void foo_bar (void);
#endif

THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright Microsoft Corporation 1986-2002.