04.01.2015 Views

RealView Compilation Tools - ARM Information Center

RealView Compilation Tools - ARM Information Center

RealView Compilation Tools - ARM Information Center

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.

Compiler-specific Features<br />

• Chapter 5 Using Scatter-loading Description Files in the Linker User Guide.<br />

4.6.4 #pragma diag_default tag[,tag,...]<br />

This pragma returns the severity of the diagnostic messages that have the specified tags<br />

to the severities that were in effect before any pragmas were issued.<br />

Syntax<br />

#pragma diag_default tag[,tag,...]<br />

Where:<br />

tag[,tag,...]<br />

is a comma-separated list of diagnostic message numbers<br />

specifying the messages whose severities are to be changed.<br />

At least one diagnostic message number must be specified.<br />

Example<br />

// not #included deliberately<br />

#pragma diag_error 223<br />

void hello(void)<br />

{<br />

printf("Hello ");<br />

}<br />

#pragma diag_default 223<br />

void world(void)<br />

{<br />

printf("world!\n");<br />

}<br />

Compiling this code with the option --diag_warning=223 generates diagnostic messages<br />

to report that the function printf() is declared implicitly.<br />

The effect of #pragma diag_default 223 is to return the severity of diagnostic message<br />

223 to Warning severity, as specified by the --diag_warning command-line option.<br />

See also<br />

• --diag_warning=tag[,tag,...] on page 2-48<br />

• #pragma diag_error tag[,tag,...] on page 4-62<br />

• #pragma diag_remark tag[,tag,...] on page 4-62<br />

• #pragma diag_suppress tag[,tag,...] on page 4-63<br />

• #pragma diag_warning tag[, tag, ...] on page 4-64<br />

<strong>ARM</strong> DUI 0348C Copyright © 2007-2010 <strong>ARM</strong>. All rights reserved. 4-61<br />

ID101213<br />

Non-Confidential,

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

Saved successfully!

Ooh no, something went wrong!