Datasheet
ARM Compiler Reference
ARM DUI 0067D Copyright © 1999-2001 ARM Limited. All rights reserved. 3-3
Pragmas controlling printf and scanf argument checking
The following pragmas control type checking of printf-like and scanf-like arguments:
check_printf_formats
This pragma marks printf-like functions for type checking against a
literal format string, if it exists. If the format is not a literal string, no type
checking is done. The format string must be the last fixed argument. For
example:
#pragma check_printf_formats
extern void myprintf(const char * format,...);
//printf format
#pragma no_check_printf_formats
check_scanf_formats
This pragma marks a function declared as a scanf-like function, so that
the arguments are type checked against the literal format string. If the
format is not a literal string, no type checking is done. The format string
must be the last fixed argument. For example:
#pragma check_scanf_formats
extern void myformat(const char * format,...);
//scanf format
#pragma no_check_scanf_formats
Pragmas controlling debugging
The following pragma controls aspects of debug table generation:
debug
This pragma turns debug table generation on or off.
If
#pragma no_debug
is specified, no debug table entries are generated for
subsequent declarations and functions until the next
#pragma debug
.
Pragmas controlling optimization
The following pragmas control aspects of optimization:
Ospace
This pragma optimizes for space (uppercase O).
Otime
This pragma optimizes for time.
Onum
This pragma changes optimization level. The value of
num
is 0, 1, or 2. See
Defining optimization criteria on page 2-24 for more information on
optimization levels.