[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]


ignore_oldstyle

Description:

Controls the recognition of function declaration that follow the convention before ANS/ISO C.

Compatibility:

This pragma is compatible with the following platform targets:

68K

PowerPC

NEC V800

Intel x86

MIPS

Embedded 68K

Prototype:
  #pragma ignore_oldstyle on | off | reset Remarks:

If pragma ignore_oldstyle is on, 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. It is the style of declaration used in the first edition of The C Programming Language (Prentice Hall) by Kernighan and Ritchie.

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

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 an option in any settings panel. By default this option is off. To check whether this option is on, use __option (ignore_oldstyle), described in "Checking Options."


[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.

Last updated: August 17, 2000