Skip to main content

IAR Embedded Workbench for RH850 3.20.x

Summary of compiler options

In this section:

This table summarizes the compiler command line options:

Command line option

Description

‑‑allow_misaligned_data_access

Allows misaligned data accesses

--allow_volatile_bit_instructions_for_all_sizes

Permits bit instructions on volatile accesses for all data types

‑‑c89

Specifies the C89 dialect

‑‑char_is_signed

Treats char as signed

‑‑char_is_unsigned

Treats char as unsigned

‑‑core

Specifies a CPU core

‑‑c++

Specifies Standard C++

-D

Defines preprocessor symbols

‑‑data_model

Specifies the data model

‑‑debug

Generates debug information

‑‑dependencies

Lists file dependencies

‑‑deprecated_feature_warnings

Enables/disables warnings for deprecated features

‑‑diag_error

Treats these as errors

‑‑diag_remark

Treats these as remarks

‑‑diag_suppress

Suppresses these diagnostics

‑‑diag_warning

Treats these as warnings

--diagnostics_format

Specifies the format for printed diagnostics

‑‑diagnostics_tables

Lists all diagnostic messages

--disable_g3m_hw_workaround

Disables the workaround for the G3M hardware error

‑‑discard_unused_publics

Discards unused public symbols

‑‑dlib_config

Uses the system include files for the DLIB library and determines which configuration of the library to use

‑‑do_explicit_zero_opt_in_named_sections

For user-named sections, treats explicit initializations to zero as zero initializations

‑‑double

Forces the compiler to use 32-bit or 64-bit doubles

--dynamic_output

Lists in a structured format all output files

-e

Enables IAR language extensions

--enable_8_byte_alignment

Enables 8-byte alignment for long long and double

‑‑enable_restrict

Enables the Standard C keyword restrict

--enable_saddr_support

Enables short addressing by locking the EP register

‑‑enum_is_int

Sets the minimum size on enumeration types

‑‑error_limit

Specifies the allowed number of errors before compilation stops

-f

Extends the command line

‑‑f

Extends the command line, optionally with a dependency

‑‑fpu

Enables the floating-point unit and sets the precision

--function_sections

Places each function of the source file in a separate section in the resulting object file

--generate_interrupt_instrumentation_code

Enables interrupt logging in the debugger

‑‑guard_calls

Enables guards for function static variable initialization

‑‑header_context

Lists all referred source files and header files

-I

Specifies include file path

-l

Creates a list file

‑‑language

Enables IAR or GNU language extensions

‑‑libc++

Makes the compiler and linker use the Libc++ library

--lock_10_regs

Locks ten registers

--lock_global_pointer_regs

Reserves 0–5 registers for use as extra global pointer registers

--lock_regs_compatibility

Permits different register locking levels

‑‑macro_positions_in _diagnostics

Obtains positions inside macros in diagnostic messages

‑‑max_cost_constexpr_call

Specifies the limit for constexpr evaluation cost

‑‑max_depth_constexpr_call

Specifies the limit for constexpr recursion depth

‑‑mfc

Enables multi-file compilation

‑‑no_bit_instructions

Disables the generation of bit instructions

‑‑no_bom

Omits the Byte Order Mark for UTF-8 output files

‑‑no_call_frame_info

Disables output of call frame information

‑‑no_clustering

Disables static clustering optimizations

‑‑no_code_motion

Disables code motion optimization

‑‑no_cross_call

Disables cross-call optimization

‑‑no_cse

Disables common subexpression elimination

‑‑no_data_model_rt_attribute

Suppresses generation of the data model runtime attribute

‑‑no_default_fp_contract

Sets the default value for STDC FP_CONTRACT to OFF

‑‑no_exceptions

This option has no effect and is included for portability reasons

‑‑no_fragments

Disables section fragment handling

‑‑no_inline

Disables function inlining

‑‑no_loop

Disables the use of the LOOP instruction

‑‑no_normalize_file_macros

Disables normalization of paths in the symbols __FILE__ and __BASE_FILE__

‑‑no_path_in_file_macros

Removes the path from the return value of the symbols __FILE__ and __BASE_FILE__

‑‑no_rtti

This option has no effect and is included for portability reasons

‑‑no_scheduling

Disables the instruction scheduler

‑‑no_size_constraints

Relaxes the normal restrictions for code size expansion when optimizing for speed

‑‑no_static_destruction

Disables destruction of C++ static variables at program exit

‑‑no_system_include

Disables the automatic search for system include files

‑‑no_tbaa

Disables type-based alias analysis

‑‑no_typedefs_in_diagnostics

Disables the use of typedef names in diagnostics

‑‑no_uniform_attribute_syntax

Specifies the default syntax rules for IAR type attributes

‑‑no_unroll

Disables loop unrolling

‑‑no_warnings

Disables all warnings

‑‑no_wrap_diagnostics

Disables wrapping of diagnostic messages

‑‑nonportable_path_warnings

Generates a warning when the path used for opening a source header file is not in the same case as the path in the file system

-O

Sets the optimization level

-o

Sets the object filename. Alias for ‑‑output

‑‑only_stdout

Uses standard output only

‑‑output

Sets the object filename

‑‑pending_instantiations

Sets the maximum number of instantiations of a given C++ template

‑‑predef_macros

Lists the predefined symbols.

‑‑preinclude

Includes an include file before reading the source file

‑‑preprocess

Generates preprocessor output

‑‑public_equ

Defines a global named assembler label

-r

Generates debug information. Alias for ‑‑debug

‑‑relaxed_fp

Relaxes the rules for optimizing floating-point expressions

‑‑remarks

Enables remarks

‑‑require_prototypes

Verifies that functions are declared before they are defined

‑‑ropi

Generates code that usesposition-independent references to access code and read-only data

‑‑section

Changes a section name

‑‑silent

Sets silent operation

‑‑source_encoding

Specifies the encoding for source files

‑‑stack_protection

Enables stack protection

‑‑strict

Checks for strict compliance with Standard C/C++

‑‑system_include_dir

Specifies the path for system include files

‑‑text_out

Specifies the encoding for text output files

‑‑uniform_attribute_syntax

Specifies the same syntax rules for IAR type attributes as for const and volatile

‑‑use_c++_inline

Uses C++ inline semantics in C

‑‑use_paths_as_written

Use paths as written in debug information

‑‑use_unix_directory_separators

Uses / as directory separator in paths

‑‑utf8_text_in

Uses the UTF-8 encoding for text input files

‑‑version

Sends compiler output to the console and then exits

‑‑vla

Enables VLA support

‑‑warn_about_c_style_casts

Makes the compiler warn when C-style casts are used in C++ source code

‑‑warn_about_incomplete_constructors

Makes the compiler warn about constructors that do not initialize all members

‑‑warn_about_missing_field_initializers

Makes the compiler warn about fields without explicit initializers

‑‑warnings_affect_exit_code

Warnings affect exit code

‑‑warnings_are_errors

Warnings are treated as errors

Table 75. Compiler options summary