11.07.2015 Views

MSP430 IAR C/C++ Compiler reference guide - Rice University

MSP430 IAR C/C++ Compiler reference guide - Rice University

MSP430 IAR C/C++ Compiler reference guide - Rice University

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The preprocessorNote that the assert macro is defined in the assert.h standard include file.In the <strong>IAR</strong> Embedded Workbench IDE, the NDEBUG symbol is automatically defined ifyou build your application in the Release build configuration._Pragma()SyntaxDescriptionExampleSee also_Pragma("string")where string follows the syntax of the corresponding pragma directive.This preprocessor operator is part of the C99 standard and can be used, for example, indefines and has the equivalent effect of the #pragma directive.Note: The -e option—enable language extensions—does not have to be specified.#if NO_OPTIMIZE#define NOOPT _Pragma("optimize=none")#else#define NOOPT#endifSee the chapter Pragma directives.#warning messageSyntaxDescription#warning messagewhere message can be any string.Use this preprocessor directive to produce messages. Typically, this is useful forassertions and other trace utilities, similar to the way the ISO/ANSI standard #errordirective is used.__VA_ARGS__Syntax #define P(...) __VA_ARGS__#define P(x,y,...) x + y + __VA_ARGS____VA_ARGS__ will contain all variadic arguments concatenated, including theseparating commas.DescriptionVariadic macros are the preprocessor macro equivalents of printf style functions.__VA_ARGS__ is part of the C99 standard.Part 2. <strong>Compiler</strong> <strong>reference</strong>229

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!