29.12.2014 Views

RealView Compilation Tools Compiler Reference Guide - ARM ...

RealView Compilation Tools Compiler Reference Guide - ARM ...

RealView Compilation Tools Compiler Reference Guide - ARM ...

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>-specific Features<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-30<br />

• #pragma diag_error tag[,tag,...]<br />

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

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

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

• Controlling the output of diagnostic messages on page 5-4 in the <strong>Compiler</strong> User<br />

<strong>Guide</strong>.<br />

4.6.5 #pragma diag_error tag[,tag,...]<br />

This pragma sets the diagnostic messages that have the specified tags to Error severity.<br />

4-52 Copyright © 2007, 2010 <strong>ARM</strong> Limited. All rights reserved. <strong>ARM</strong> DUI 0348A<br />

Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!