29.10.2014 Views

ARM Compiler toolchain v4.1 for µVision Using the Compiler

ARM Compiler toolchain v4.1 for µVision Using the Compiler

ARM Compiler toolchain v4.1 for µVision Using the Compiler

SHOW MORE
SHOW LESS

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

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

<strong>Compiler</strong> Coding Practices<br />

5.67 __func__ predefined identifier in C99<br />

The __func__ predefined identifier provides a means of obtaining <strong>the</strong> name of <strong>the</strong> current<br />

function. For example, <strong>the</strong> function:<br />

void foo(void)<br />

{<br />

printf("This function is called '%s'.\n", __func__);<br />

}<br />

prints:<br />

This function is called 'foo'.<br />

5.67.1 See also<br />

Concepts<br />

• New language features of C99 on page 5-77.<br />

Reference<br />

• Function names on page 5-102 (__PRETTY_FUNCTION__).<br />

<strong>ARM</strong> DUI 0375C Copyright © 2007-2008, 2011 <strong>ARM</strong>. All rights reserved. 5-85<br />

ID061811<br />

Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!