-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 //), this option may be used to allow C++ comments (refer to 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 foo(void) // this is a C++ comment
See also

-Ansi: Strict ANSI