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


mpwc_relax

Description:

Controls the compatibility of the char* and unsigned char* types.

Compatibility:

This pragma is compatible with the following platform targets:

68K

PowerPC

NEC V800

Intel x86

MIPS

Embedded 68K

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

When you turn on this pragma, the compiler treats char* and unsigned char* as the same type. This option is especially useful if you're using code written before the ANSI C standard. This old source code frequently used these types interchangeably.

This option has no effect on C++ source code.

This pragma may be used to relax function pointer checking:


#pragma mpwc_relax on
extern void f(char *);
extern void(*fp1)(void *) = &f;          // error but allowed
extern void(*fp2)(unsigned char *) = &f; // error but allowed

This pragma corresponds to the Relaxed Pointer Type Rules option in the C/C++ Language Panel. To check whether this option is on, __option (mpwc_relax), 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