2.4.3. Changed compiler behavior

This section describes compiler behavior that is new, changed, deprecated, or obsolete. Obsolete features are identified explicitly. Their use is faulted in ADS. Deprecated features will be made obsolete in future releases. Their use is warned about in ADS.

New compiler options

The following new warning options are available in the compilers:

-We

Turn off warnings about pointer casts

-Wm

Turn off warnings about multi-character char constants

-Wo

Turn off warnings about implicit conversion to signed long long

-Wq

Turn off warnings about C++ constructor initialization order

-Wy

Turn off warnings about deprecated features.

Use -W+option to turn a warning on. For example use -W+e to turn on warnings about pointer casts.

The following additional new options are available in the compilers:

-Ono_inline

Disable inlining. This option replaces -zpdebug_inlines.

-memaccess

Specifies the memory attributes of the target system.

-nostrict

Enables minor extensions to the C and C++ standards.

The changes to the qualifiers to the -apcs option are listed in Table 2.1.

Table 2.1. Procedure call standard qualifiers

ADS formSDT 2.50/2.51 equivalent
[no]interwork[no]interwork
[no]ropiNot available
[no]rwpiNot available
[no]swstackcheck[no]swstackcheck

Obsolete. Now always nofp.

[no]fp
No direct equivalent. For default behavior use -fpu softVFP. For compatibility with legacy SDT objects or libraries, use -fpu softFPA.softfp
No direct equivalent, use -fpu FPA.hardfp
Not available.[no]fpregargs

Obsolete. Now always narrow.

narrow, wide
No direct equivalent, use -rwpi.[non]reentrant
Impact

Update your projects or makefiles to compile with the appropriate options. In most cases you do not have to change your source code to use the new options.

Check the assembler, compiler, and linker options for your new or migrated projects as the defaults for ADS 1.0 are different from the defaults for SDT 2.50/2.51.

Obsolete compiler pragmas

The following pragmas from the ARM Software Development Toolkit are not supported in the compiler:


check_memory_accesses
optimize_cross_jump
optimize_cse
optimize_multiple_loads
optimise_scheduling
side_effects
continue_after_hash_error
debug_inlines
force_toplevel
include_only_once

Impact

If you are creating new applications, there is no impact. If you are recompiling existing applications, ensure that the appropriate build options are specified to the compiler. Remove any obsolete pragmas from your source code and replace them, where necessary, with equivalent compiler options.

Obsolete compiler options

The following options from the ARM Software Development Toolkit are not supported in the compiler:

-zpname

Select pragma from command line.

-zinumber

Replaced by -Ospace and -Otime.

-gxletter

Replaced by the -O[0|1|2] options.

-dwarf

Use -dwarf2 (or -dwarf1).

-aof

Output AOF.

-asd

Output ASD format debug tables.

-MD

Generate APM dependency.

-cfront

Select Cfront-style C++.

-pcc

Select Berkeley PCC.

-fussy

Synonym for -strict.

-pedantic

Synonym for -strict.

-fw

Make string literals writable.

-zanumber

Use -memaccess instead. The default behavior for ADS 1.0 is for LDR to access only word-aligned addresses (-za1).

-zt

Fault tentative declarations. This is the default for ADS 1.01 and earlier unless -strict is specified.

-zznumber

Default is -zzt0.

-zztnumber

Combines the -zt and -zz options.

-zap

Specify whether pointers to structures are assumed to be aligned on at least the minimum byte alignment boundaries set by -zas. The behavior for ADS 1.0 is -zap0.

-zat

Default is -zat1.

-zrnumber

Set the number of register values transferred by LDM and STM instructions. The compilers never generate LDM or STM instructions that transfer more than nine register values for either ARM code or Thumb code.

-fz

This is now the default.

Impact

If you are creating new applications, there is no impact. If you are recompiling existing applications, ensure that the appropriate build options are specified to the compiler. Remove any obsolete options from your make files and replace them, where necessary, with equivalent options. Check the assembler, compiler, and linker options for your new or migrated projects as the defaults for ADS 1.0 are different from the defaults for the SDT 2.50/2.51.

Deprecated compiler options

The following options are deprecated and will not be supported in future versions of the compiler:

-dwarf1

Use -dwarf2.

-proc, -arch

Select processor or architecture. Use -cpu instead.

-zasnum

Align structures on at least a num-byte boundary (1, 2, 4, or 8). The default is now 1 (align only as strictly as the contents of the structure require).

Impact

You can still output DWARF1 debug tables. However, the functionality of these output files when used with the new debuggers might be reduced. Use DWARF2 format for new projects and update your existing tools to use the DWARF2 format.

Obsolete ARM-specific language extensions

The following language extensions are obsolete:

__global_freg

This language extension is not required.

___weak (three underscores)

This was a synonym for __weak (two underscores) in SDT 2.50/2.51. Use __weak.

__softfp

This is a storage class specifier you can use in the declaration of a function to indicate that the function has a software floating-point interface (a double parameter passed in two integer registers, a double result returned in a0, a1) even though its implementation may use floating-point instructions. Use this to create ARM-state, VFP-using (or FPA-using) functions that you can call directly from Thumb state (in Thumb state, floating-point instructions are inaccessible).

Obsolete and new predefined macros

The obsolete predefined macros are listed in Table 2.2.

Table 2.2. Obsolete predefined macros

PredefineStatusComments
__CLK_TCKObsoleteC library use only.
__APCS_32ObsoleteRelates to obsolete APCS/TPCS. No ATPCS equivalent.
__APCS_FPREGARGSObsoleteRelates to obsolete APCS/TPCS. No ATPCS equivalent.
__APCS_NOFPObsoleteRelates to obsolete APCS/TPCS. No ATPCS equivalent.
__APCS_REENTObsoleteRelates to obsolete APCS/TPCS. No ATPCS equivalent.
__APCS_NOSWSTObsoleteRelates to obsolete APCS/TPCS. Use new __APCS_SWST.
__CFRONT_LIKEObsoleteThe option -cfront is now obsolete.
__DIALECT_PCCObsoleteThe option -pcc is now obsolete.
__DIALECT_FUSSYObsoleteThe option -fussy is now obsolete.

The new predefined macros are listed in Table 2.3.

Table 2.3. New predefined macros

PredefineStatusComments
__CC_ARMNew

Always defined.

__STRICT_ANSI__New

Set by -strict.

__embedded_cplusplusNew

Set by -embeddedcplusplus.

__APCS_ROPINew

Set by -apcs /ropi.

__APCS_RWPINew

Set by -apcs /rwpi.

__APCS_SWSTNew

Set by -apcs /swst.

__FEATURE_SIGNED_CHARNew

Set by -zc.

__OPTIMISE_SPACENew

Set by -Ospace.

__OPTIMISE_TIMENew

Set by -Otime.

__TARGET_FPUNew

Target Floating Point Unit

__TARGET_FEATURE_DSPMULNew

Set if ARM9E multiplier available.

Copyright © 1999-2001 ARM Limited. All rights reserved.ARM DUI 0064D
Non-Confidential