cplusplus. NXP CodeWarrior Development Studio
Reklama
Reklama
cplusplus
Syntax
#pragma bool on | off | reset
Remarks
If you enable this pragma, you can use the standard C++ bool
type to represent true
and false
. Disable this pragma if bool
, true
, or false
are defined in your source code.
Enabling the bool
data type and its true
and false
values is not equivalent to defining them in source code with typedef
, enum
, or
#define
. The C++ bool
type is a distinct type defined by the ISO/IEC 14882:2003 C++ Standard. Source code that does not treat bool
as a distinct type might not compile properly.
This pragma corresponds to the Enable bool Support setting in the CodeWarrior IDE's
Properties > C/C++ Build > Settings > Tool Settings > PowerPC Compiler> C/C++
Language settings panel. By default, this setting is on
.
29.9 cplusplus
Controls whether or not to translate subsequent source code as C or C++ source code.
Syntax
#pragma cplusplus on | off | reset
Remarks
If you enable this pragma, the compiler translates the source code that follows as C++ code. Otherwise, the compiler uses the suffix of the filename to determine how to compile it. If a file name ends in
.c
,
.h
, or
.pch
, the compiler automatically compiles it as C code, otherwise as C++. Use this pragma only if a file contains both C and C++ code.
NOTE
The CodeWarrior C/C++ compilers do not distinguish between uppercase and lowercase letters in file names and file name extensions except on UNIX-based systems.
This pragma corresponds to the Force C++ Compilation setting in the CodeWarrior
IDE's Properties > C/C++ Build > Settings > Tool Settings > PowerPC Compiler >
C/C++ Language settings panel. By default, this pragma is disabled.
CodeWarrior Development Studio for Power Architecture Processors Build Tools Reference Manual, Rev.
10.6, 02/2014
436 Freescale Semiconductor, Inc.
Stáhnout
Reklama