diff -r 4891d49809bb -r 2b3996fc09a1 core/com.nokia.carbide.cpp.compiler.doc.user/html/symbols/sym_settings.htm --- a/core/com.nokia.carbide.cpp.compiler.doc.user/html/symbols/sym_settings.htm Mon Jul 19 15:31:48 2010 -0500 +++ b/core/com.nokia.carbide.cpp.compiler.doc.user/html/symbols/sym_settings.htm Mon Jul 19 16:13:24 2010 -0500 @@ -1,643 +1,643 @@ - - - - - -Checking Settings - - - -

Checking Settings

-

The preprocessor function __option() lets you check pragmas and other settings that control the C/C++ compiler and code generation. You typically modify these settings using various panels in the Project Settings window.

-

The syntax for this preprocessor function is as follows:

-

__option(setting-name)

-

If the specified setting is enabled, __option() returns 1; otherwise it returns 0.

-

To determine if a setting-name is invalid, see Warnings as Errors.

-

Use this function when you want one source file to contain code that uses different settings. The example below shows how to compile one series of lines if you are compiling for machines with the MC68881 floating-point unit and another series if you are compiling for machines without it:

-

#if __option (code68881) // Code for 68K chip with FPU
- #else
- // Code for any 68K processor
- #endif

-

Table 1 lists all the setting names you can use in the preprocessor function __option().

-
Table 1. Preprocessor Setting Names for __option()
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This argument...Corresponds to the…
a6framesPragma a6frames.
align_array_membersPragma align_array_members.
altivec_codegenPragma altivec_codegen.
altivec_modelPragma altivec_model.
altivec_vrsavePragma altivec_vrsave.
always_inlinePragma always_inline.
ANSI_strictANSI Strict setting and pragma ANSI_strict.
arg_dep_lookupPragma arg_dep_lookup.
ARM_conformPragma ARM_conform.
array_new_deletePragma array_new_delete
auto_inlineAuto-Inline setting of the Inlining menu and pragma auto_inline.
boolEnable bool Support setting and pragma bool.
check_header_flagsPragma check_header_flags.
code68020Pragma code68020.
code68881Pragma code68881.
const_multiplyPragma const_multiply.
const_stringsPragma const_strings.
cplusplusForce C++ Compilation setting , the pragma cplusplus, and the macro cplusplus. Indicates whether the compiler is compiling this file as a C++ file.
cpp_extensionsPragma cpp_extensions.
d0_pointersPragmas pointers_in_D0 and pointers_in_A0.
def_inheritedPragma def_inherited.
defer_codegenPragma defer_codegen.
defer_defarg_parsingPragma defer_defarg_parsing
direct_destructionNo longer available
direct_to_SOMPragma direct_to_SOM.
disable_registersPragma disable_registers.
dollar_identifiersPragma dollar_identifiers.
dont_inlineDon’t Inline setting and pragma dont_inline.
dont_reuse_stringsReuse Strings setting and pragma dont_reuse_strings.
ecplusplusPragma ecplusplus.
EIPC_EIPSWPragma EIPC_EIPSW.
enumsalwaysintEnums Always Int setting and pragma enumsalwaysint.
exceptionsEnable C++ Exceptions setting and pragma exceptions.
exportPragma export.
extended_errorcheckExtended Error Checking setting and pragma extended_errorcheck.
far_dataPragma far_data.
far_stringsPragma far_strings.
far_vtablesPragma far_vtables.
faster_pch_genPragma faster_pch_gen.
float_constantsPragma float_constants.
force_activePragma force_active.
fourbyteintsPragma fourbyteints.
fp_contractPragma fp_contract.
fullpath_prepdumpPragma fullpath_prepdump.
function_alignPragma function_align.
gcc_extensionsPragma gcc_extensions.
IEEEdoublesPragma IEEEdoubles.
ignore_oldstylePragma ignore_oldstyle.
importPragma import.
inline_bottom_upPragma inline_bottom_up.
inline_bottom_up_oncePragma inline_bottom_up_once
inline_intrinsicsPragma inline_intrinsics.
inline_max_auto_sizePragma inline_max_auto_size
inline_max_sizePragma inline_max_size
inline_max_total_sizePragma inline_max_total_size
internalPragma internal.
interruptPragma interrupt.
k63dK6 3D Favored setting in the Extended Instruction Set menu of the x86 CodeGen panel and pragma k63d.
k63d_calls MMX + K6 3D setting in the Extended Instruction Set menu of the x86 CodeGen panel and pragma k63d_calls.
lib_exportPragma lib_export.
line_prepdumpPragma line_prepdump.
little_endianNo option. Defined as 1 if you are compiling for a little endian target (such as x86); 0 if you are compiling for a big endian target (such as PowerPC).
longlongPragma longlong.
longlong_enumsPragma longlong_enums.
longlong_prepevalPragma longlong_prepeval.
macsbugPragma macsbug.
max_errorsPragma max_errors
microsoft_exceptionsPragma microsoft_exceptions.
microsoft_RTTIPragma microsoft_RTTI.
mmxMMX setting in the Extended Instruction Set menu of the x86 CodeGen panel and pragma mmx.
mmx_callPragma mmx_call.
mpwcPragma mpwc.
mpwc_newlinePragma mpwc_newline.
mpwc_relaxPragma mpwc_relax.
msg_show_linerefPragma msg_show_lineref
msg_show_realrefPragma msg_show_realref
multibyteaware_ preserve_literalsPragma multibyteaware_ -preserve_literals
no_conststringconvPragma no_conststringconv
no_register_coloringPragma no_register_coloring.
no_static_dtorsPragma no_static_dtors.
no_conststringconvPragma no_conststringconv
oldstyle_symbolsPragma oldstyle_symbols.
only_std_keywordsANSI Keywords Only setting and pragma only_std_keywords.
opt_classresultsPragma opt_classresults
opt_common_subsPragma opt_common_subs.
opt_dead_assignmentsPragma opt_dead_assignments.
opt_dead_codePragma opt_dead_code.
opt_lifetimesPragma opt_lifetimes.
opt_loop_invariantsPragma opt_loop_invariants.
opt_propagationPragma opt_propagation.
opt_strength_reductionPragma opt_strength_reduction.
opt_strength_reduction_strictPragma opt_strength_reduction_strict.
opt_unroll_loopsPragma opt_unroll_loops.
opt_vectorize_loopsPragma opt_vectorize_loops.
optimize_for_sizePragma optimize_for_size.
optimizewithasmPragma optimizewithasm.
pool_dataPragma pool_data.
pool_stringsPool Strings setting and pragma pool_strings.
ppc_unroll_speculativePragma ppc_unroll_speculative.
precompileWhether or not the file is precompiled.
preprocessWhether or not the file is preprocessed.
profilePragma profile.
readonly_stringsPragma readonly_strings.
register_coloringPragma register_coloring.
require_prototypesRequire Function Prototypes setting and pragma require_prototypes.
RTTIEnable RTTI setting and pragma RTTI.
showmessagenumberPragma showmessagenumber
side_effectsPragma side_effects.
simple_prepdumpPragma simple_prepdump.
SOMCallOptimizationPragma SOMCallOptimization.
SOMCheckEnvironmentPragma SOMCheckEnvironment.
stack_cleanupPragma stack_cleanup.
suppress_init_codePragma suppress_init_code.
suppress_warningsPragma suppress_warnings.
symMarker in the project window debug column and pragma sym.
syspath_oncePragma syspath_once.
text_encodingPragma text_encoding
toc_dataPragma toc_data.
tracebackPragma traceback.
trigraphsExpand Trigraphs setting and pragma trigraphs.
unsigned_charUse Unsigned Chars setting and pragma unsigned_char.
use_fp_instructionsPragma use_fp_instructions.
use_framePragma use_frame.
use_mask_registersPragma use_mask_registers.
warningPragma warning
warn_any_ptr_int_convPragma warn_any_ptr_int_conv
warn_emptydeclEmpty Declarations setting and pragma warn_emptydecl.
warn_extracommaExtra Commas setting and pragma warn_extracomma.
warn_hiddenlocalsPragma warn_hiddenlocals
warn_hidevirtualHidden virtual functions setting and pragma warn_hidevirtual.
warn_illegal_instructions Pragma warn_illegal_instructions.
warn_illpragmaIllegal Pragmas setting and pragma warn_illpragma.
warn_illtokenpastingPragma warn_illtokenpasting
warn_illunionmembersPragma warn_illunionmembers
warn_impl_f2i_convPragma warn_impl_f2i_conv.
warn_impl_i2f_convPragma warn_impl_i2f_conv.
warn_impl_s2u_convPragma warn_impl_s2u_conv.
warn_implicitconvImplicit Arithmetic Conversions setting and pragma warn_implicitconv.
warn_missingreturnPragma warn_missingreturn
warn_no_explicit_virtualPragma warn_no_explicit_virtual
warn_no_side_effectpragma warn_no_side_effect.
warn_notinlinedNon-Inlined Functions setting and pragma warn_notinlined.
warn_paddingpragma warn_padding.
warn_possunwantPossible Errors setting and pragma warn_possunwant.
warn_ptr_int_convpragma warn_ptr_int_conv.
warn_resultnotusedpragma warn_resultnotused.
warn_structclassInconsistent ‘class’ / ‘struct’ Usage setting and pragma warn_structclass.
warn_undefmacropragma warn_undefmacro
warn_unusedargUnused Arguments setting and pragma warn_unusedarg.
warn_unusedvarUnused Variables setting and pragma warn_unusedvar.
warning_errorsTreat Warnings As Errors setting and pragma warning_errors.
wchar_typeEnable wchar_t Support setting and pragma wchar_type.
-

- - - - - + + + + + +Checking Settings + + + +

Checking Settings

+

The preprocessor function __option() lets you check pragmas and other settings that control the C/C++ compiler and code generation. You typically modify these settings using various panels in the Project Settings window.

+

The syntax for this preprocessor function is as follows:

+

__option(setting-name)

+

If the specified setting is enabled, __option() returns 1; otherwise it returns 0.

+

To determine if a setting-name is invalid, see Warnings as Errors.

+

Use this function when you want one source file to contain code that uses different settings. The example below shows how to compile one series of lines if you are compiling for machines with the MC68881 floating-point unit and another series if you are compiling for machines without it:

+

#if __option (code68881) // Code for 68K chip with FPU
+ #else
+ // Code for any 68K processor
+ #endif

+

Table 1 lists all the setting names you can use in the preprocessor function __option().

+
Table 1. Preprocessor Setting Names for __option()
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
This argument...Corresponds to the…
a6framesPragma a6frames.
align_array_membersPragma align_array_members.
altivec_codegenPragma altivec_codegen.
altivec_modelPragma altivec_model.
altivec_vrsavePragma altivec_vrsave.
always_inlinePragma always_inline.
ANSI_strictANSI Strict setting and pragma ANSI_strict.
arg_dep_lookupPragma arg_dep_lookup.
ARM_conformPragma ARM_conform.
array_new_deletePragma array_new_delete
auto_inlineAuto-Inline setting of the Inlining menu and pragma auto_inline.
boolEnable bool Support setting and pragma bool.
check_header_flagsPragma check_header_flags.
code68020Pragma code68020.
code68881Pragma code68881.
const_multiplyPragma const_multiply.
const_stringsPragma const_strings.
cplusplusForce C++ Compilation setting , the pragma cplusplus, and the macro cplusplus. Indicates whether the compiler is compiling this file as a C++ file.
cpp_extensionsPragma cpp_extensions.
d0_pointersPragmas pointers_in_D0 and pointers_in_A0.
def_inheritedPragma def_inherited.
defer_codegenPragma defer_codegen.
defer_defarg_parsingPragma defer_defarg_parsing
direct_destructionNo longer available
direct_to_SOMPragma direct_to_SOM.
disable_registersPragma disable_registers.
dollar_identifiersPragma dollar_identifiers.
dont_inlineDon’t Inline setting and pragma dont_inline.
dont_reuse_stringsReuse Strings setting and pragma dont_reuse_strings.
ecplusplusPragma ecplusplus.
EIPC_EIPSWPragma EIPC_EIPSW.
enumsalwaysintEnums Always Int setting and pragma enumsalwaysint.
exceptionsEnable C++ Exceptions setting and pragma exceptions.
exportPragma export.
extended_errorcheckExtended Error Checking setting and pragma extended_errorcheck.
far_dataPragma far_data.
far_stringsPragma far_strings.
far_vtablesPragma far_vtables.
faster_pch_genPragma faster_pch_gen.
float_constantsPragma float_constants.
force_activePragma force_active.
fourbyteintsPragma fourbyteints.
fp_contractPragma fp_contract.
fullpath_prepdumpPragma fullpath_prepdump.
function_alignPragma function_align.
gcc_extensionsPragma gcc_extensions.
IEEEdoublesPragma IEEEdoubles.
ignore_oldstylePragma ignore_oldstyle.
importPragma import.
inline_bottom_upPragma inline_bottom_up.
inline_bottom_up_oncePragma inline_bottom_up_once
inline_intrinsicsPragma inline_intrinsics.
inline_max_auto_sizePragma inline_max_auto_size
inline_max_sizePragma inline_max_size
inline_max_total_sizePragma inline_max_total_size
internalPragma internal.
interruptPragma interrupt.
k63dK6 3D Favored setting in the Extended Instruction Set menu of the x86 CodeGen panel and pragma k63d.
k63d_calls MMX + K6 3D setting in the Extended Instruction Set menu of the x86 CodeGen panel and pragma k63d_calls.
lib_exportPragma lib_export.
line_prepdumpPragma line_prepdump.
little_endianNo option. Defined as 1 if you are compiling for a little endian target (such as x86); 0 if you are compiling for a big endian target (such as PowerPC).
longlongPragma longlong.
longlong_enumsPragma longlong_enums.
longlong_prepevalPragma longlong_prepeval.
macsbugPragma macsbug.
max_errorsPragma max_errors
microsoft_exceptionsPragma microsoft_exceptions.
microsoft_RTTIPragma microsoft_RTTI.
mmxMMX setting in the Extended Instruction Set menu of the x86 CodeGen panel and pragma mmx.
mmx_callPragma mmx_call.
mpwcPragma mpwc.
mpwc_newlinePragma mpwc_newline.
mpwc_relaxPragma mpwc_relax.
msg_show_linerefPragma msg_show_lineref
msg_show_realrefPragma msg_show_realref
multibyteaware_ preserve_literalsPragma multibyteaware_ +preserve_literals
no_conststringconvPragma no_conststringconv
no_register_coloringPragma no_register_coloring.
no_static_dtorsPragma no_static_dtors.
no_conststringconvPragma no_conststringconv
oldstyle_symbolsPragma oldstyle_symbols.
only_std_keywordsANSI Keywords Only setting and pragma only_std_keywords.
opt_classresultsPragma opt_classresults
opt_common_subsPragma opt_common_subs.
opt_dead_assignmentsPragma opt_dead_assignments.
opt_dead_codePragma opt_dead_code.
opt_lifetimesPragma opt_lifetimes.
opt_loop_invariantsPragma opt_loop_invariants.
opt_propagationPragma opt_propagation.
opt_strength_reductionPragma opt_strength_reduction.
opt_strength_reduction_strictPragma opt_strength_reduction_strict.
opt_unroll_loopsPragma opt_unroll_loops.
opt_vectorize_loopsPragma opt_vectorize_loops.
optimize_for_sizePragma optimize_for_size.
optimizewithasmPragma optimizewithasm.
pool_dataPragma pool_data.
pool_stringsPool Strings setting and pragma pool_strings.
ppc_unroll_speculativePragma ppc_unroll_speculative.
precompileWhether or not the file is precompiled.
preprocessWhether or not the file is preprocessed.
profilePragma profile.
readonly_stringsPragma readonly_strings.
register_coloringPragma register_coloring.
require_prototypesRequire Function Prototypes setting and pragma require_prototypes.
RTTIEnable RTTI setting and pragma RTTI.
showmessagenumberPragma showmessagenumber
side_effectsPragma side_effects.
simple_prepdumpPragma simple_prepdump.
SOMCallOptimizationPragma SOMCallOptimization.
SOMCheckEnvironmentPragma SOMCheckEnvironment.
stack_cleanupPragma stack_cleanup.
suppress_init_codePragma suppress_init_code.
suppress_warningsPragma suppress_warnings.
symMarker in the project window debug column and pragma sym.
syspath_oncePragma syspath_once.
text_encodingPragma text_encoding
toc_dataPragma toc_data.
tracebackPragma traceback.
trigraphsExpand Trigraphs setting and pragma trigraphs.
unsigned_charUse Unsigned Chars setting and pragma unsigned_char.
use_fp_instructionsPragma use_fp_instructions.
use_framePragma use_frame.
use_mask_registersPragma use_mask_registers.
warningPragma warning
warn_any_ptr_int_convPragma warn_any_ptr_int_conv
warn_emptydeclEmpty Declarations setting and pragma warn_emptydecl.
warn_extracommaExtra Commas setting and pragma warn_extracomma.
warn_hiddenlocalsPragma warn_hiddenlocals
warn_hidevirtualHidden virtual functions setting and pragma warn_hidevirtual.
warn_illegal_instructions Pragma warn_illegal_instructions.
warn_illpragmaIllegal Pragmas setting and pragma warn_illpragma.
warn_illtokenpastingPragma warn_illtokenpasting
warn_illunionmembersPragma warn_illunionmembers
warn_impl_f2i_convPragma warn_impl_f2i_conv.
warn_impl_i2f_convPragma warn_impl_i2f_conv.
warn_impl_s2u_convPragma warn_impl_s2u_conv.
warn_implicitconvImplicit Arithmetic Conversions setting and pragma warn_implicitconv.
warn_missingreturnPragma warn_missingreturn
warn_no_explicit_virtualPragma warn_no_explicit_virtual
warn_no_side_effectpragma warn_no_side_effect.
warn_notinlinedNon-Inlined Functions setting and pragma warn_notinlined.
warn_paddingpragma warn_padding.
warn_possunwantPossible Errors setting and pragma warn_possunwant.
warn_ptr_int_convpragma warn_ptr_int_conv.
warn_resultnotusedpragma warn_resultnotused.
warn_structclassInconsistent ‘class’ / ‘struct’ Usage setting and pragma warn_structclass.
warn_undefmacropragma warn_undefmacro
warn_unusedargUnused Arguments setting and pragma warn_unusedarg.
warn_unusedvarUnused Variables setting and pragma warn_unusedvar.
warning_errorsTreat Warnings As Errors setting and pragma warning_errors.
wchar_typeEnable wchar_t Support setting and pragma wchar_type.
+

+ + + + +