Download ARM® Compiler armcc User Guide
Transcript
10 Compiler-specific Features
10.78 #pragma diag_default tag[,tag,...]
10.78
#pragma diag_default tag[,tag,...]
This pragma returns the severity of the diagnostic messages that have the specified tags to the
severities that were in effect before any pragmas were issued. Diagnostic messages are messages
whose message numbers are postfixed by -D, for example, #550-D.
Syntax
#pragma diag_default tag[,tag,...]
Where:
tag[,tag,...]
is a comma-separated list of diagnostic message numbers specifying the messages whose
severities are to be changed.
At least one diagnostic message number must be specified.
Examples
// <stdio.h> not #included deliberately
#pragma diag_error 223
void hello(void)
{
printf("Hello ");
}
#pragma diag_default 223
void world(void)
{
printf("world!\n");
}
Compiling this code with the option --diag_warning=223 generates diagnostic messages to
report that the function printf() is declared implicitly.
The effect of #pragma diag_default 223 is to return the severity of diagnostic message 223
to Warning severity, as specified by the --diag_warning command-line option.
Related concepts
6.3 Controlling compiler diagnostic messages with pragmas on page 6-270.
Related references
10.79 #pragma diag_error tag[,tag,...] on page 10-696.
10.80 #pragma diag_remark tag[,tag,...] on page 10-697.
10.81 #pragma diag_suppress tag[,tag,...] on page 10-698.
10.82 #pragma diag_warning tag[, tag, ...] on page 10-699.
8.61 --diag_warning=tag[,tag,...] on page 8-401.
ARM DUI0472J
Copyright © 2010-2013 ARM. All rights reserved.
Non-Confidential
10-695