mpwc_relax

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

Syntax
#pragma mpwc_relax on | off | reset
  
Remarks

If you enable this pragma, the compiler treats char* and unsigned char* as the same type. Use this setting to compile source code written before the ISO C standards. Old source code frequently uses these types interchangeably.

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

Note: Turning this option on may prevent the compiler from detecting some programming errors. We recommend not turning on this option.

Relaxing function pointer checking shows how to use this pragma to relax function pointer checking.

Listing 1. Relaxing function pointer checking
#pragma mpwc_relax on
extern void f(char *);

/* Normally an error, but allowed. */
extern void(*fp1)(void *) = &f; 

/* Normally an error, but allowed. */
extern void(*fp2)(unsigned char *) = &f;

This pragma does not correspond to any panel setting. By default, this pragma is disabled.

Related information
asmpoundcomment
asmsemicolcomment
const_strings
dollar_identifiers
gcc_extensions
mark
mpwc_newline
multibyteaware
multibyteaware_preserve_literals
text_encoding
trigraphs
unsigned_char