ignore_oldstyle

Controls the recognition of function declarations that follow the conventions in place before ANSI/ISO C (i.e., “K&R” style).

Syntax

#pragma ignore_oldstyle on | off | reset

Targets
All platforms.
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 do not specify the types of the arguments in the argument list but on separate lines.

For example, the code in Listing 10.21 defines a prototype for a function with an old-style declaration.

Listing 10.21 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. To check this setting, use __option (ignore_oldstyle), described in Checking Settings. The default setting is off.