-Cppc: C++ Comments in ANSI-C

Group

LANGUAGE

Scope

Function

Syntax
  -Cppc 
  
Arguments

None

Default

By default, the Compiler does not allow C++ comments if the -Ansi: Strict ANSI compiler option is set.

Defines

None

Pragmas

None

Description

The -Ansi option forces the compiler to conform to the ANSI-C standard. Because a strict ANSI-C compiler rejects any C++ comments (started with //), use this option to allow C++ comments (as shown in the following listing).

Listing: Using -Cppc to Allow C++ Comments


-Cppc /* This allows the code containing C++ comments to be compiled with

   the 
-Ansi option set */

void myfun(void) // this is a C++ comment
See also

-Ansi: Strict ANSI compiler option