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...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

C language extensionsint test(int x){if (x){extern int y;y = 1;}●return y;}Expanding function names into strings with the function as contextUse any of the symbols __func__ or __FUNCTION__ inside a function body tomake it expand into a string, with the function name as context. Use the symbol__PRETTY_FUNCTION__ to also include the parameter types and return type. Theresult might, for example, look like this if you use the __PRETTY_FUNCTION__symbol:"void func(char)"These symbols are useful for assertions and other trace utilities and they require thatlanguage extensions are enabled, see -e, page 150.188<strong>MSP430</strong> <strong>IAR</strong> C/<strong>C++</strong> <strong>Compiler</strong>Reference Guide

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

Saved successfully!

Ooh no, something went wrong!