only_std_keywords. NXP CodeWarrior Development Studio
Mainos
Mainos
Chapter 28 Pragmas for Standard C Conformance
Syntax
#pragma ignore_oldstyle on | off | reset
Remarks
If you enable this pragma, the compiler ignores old-style function declarations and lets you prototype a function any way you want. In old-style declarations, you specify the types of arguments on separate lines instead of the function's argument list. For example,
the code in Listing 28-1 on page 429 defines a prototype for a function with an old-style
definition.
Listing 28-1. Mixing Old-style and Prototype Function Declarations
int f(char x, short y, float z);
#pragma ignore_oldstyle on f(x, y, z) char x; short y; float z;
{
return (int)x+y+z;
}
#pragma ignore_oldstyle reset
This pragma does not correspond to any panel setting. By default, this setting is disabled.
28.5 only_std_keywords
Controls the use of ISO/IEC keywords.
Syntax
#pragma only_std_keywords on | off | reset
Remarks
The compiler recognizes additional reserved keywords. If you are writing source code that must follow the ISO/IEC C standards strictly, enable the pragma only_std_keywords
.
By default, this pragma is disabled.
CodeWarrior Development Studio for Power Architecture Processors Build Tools Reference Manual, Rev.
10.6, 02/2014
Freescale Semiconductor, Inc.
429
Lataa
Mainos