Bentley BumperSticker
Bentley BumperSticker
Bentley BumperSticker
Version 5.06
ARM® Compiler
Errors and Warnings Reference Guide
Copyright © 2010-2015 ARM. All rights reserved.
Release Information
Document History
Your access to the information in this document is conditional upon your acceptance that you will not use or permit others to use
the information for the purposes of determining whether implementations infringe any third party patents.
THIS DOCUMENT IS PROVIDED “AS IS”. ARM PROVIDES NO REPRESENTATIONS AND NO WARRANTIES,
EXPRESS, IMPLIED OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
MERCHANTABILITY, SATISFACTORY QUALITY, NON-INFRINGEMENT OR FITNESS FOR A PARTICULAR PURPOSE
WITH RESPECT TO THE DOCUMENT. For the avoidance of doubt, ARM makes no representation with respect to, and has
undertaken no analysis to identify or understand the scope and content of, third party patents, copyrights, trade secrets, or other
rights.
TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT WILL ARM BE LIABLE FOR ANY DAMAGES,
INCLUDING WITHOUT LIMITATION ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, PUNITIVE, OR
CONSEQUENTIAL DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING
OUT OF ANY USE OF THIS DOCUMENT, EVEN IF ARM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
This document consists solely of commercial items. You shall be responsible for ensuring that any use, duplication or disclosure of
this document complies fully with any relevant export laws and regulations to assure that this document or any portion thereof is
not exported, directly or indirectly, in violation of such export laws. Use of the word “partner” in reference to ARM’s customers is
not intended to create or refer to any partnership relationship with any other company. ARM may make changes to this document at
any time and without notice.
If any of the provisions contained in these terms conflict with any of the provisions of any signed written agreement covering this
document with ARM, then the signed written agreement prevails over and supersedes the conflicting provisions of these terms.
This document may be translated into other languages for convenience, and you agree that if there is any conflict between the
English version of this document and any translation, the terms of the English version of the Agreement shall prevail.
Words and logos marked with ® or ™ are registered trademarks or trademarks of ARM Limited or its affiliates in the EU and/or
elsewhere. All rights reserved. Other brands and names mentioned in this document may be the trademarks of their respective
owners. Please follow ARM’s trademark usage guidelines at http://www.arm.com/about/trademark-usage-guidelines.php
LES-PRE-20349
Confidentiality Status
This document is Non-Confidential. The right to use, copy and disclose this document may be subject to license restrictions in
accordance with the terms of the agreement entered into by ARM and the party that ARM delivered this document to.
Preface
About this book ...................................................... ...................................................... 8
Feedback ...................................................................................................................... 9
This preface introduces the ARM® Compiler Errors and Warnings Reference Guide.
It contains the following:
• About this book on page 8.
• Feedback on page 9.
Typographic conventions
italic
Introduces special terminology, denotes cross-references, and citations.
bold
Highlights interface elements, such as menu names. Denotes signal names. Also used for terms
in descriptive lists, where appropriate.
monospace
Denotes text that you can enter at the keyboard, such as commands, file and program names,
and source code.
monospace
Denotes a permitted abbreviation for a command or option. You can enter the underlined text
instead of the full command or option name.
monospace italic
Denotes arguments to monospace text where the argument is to be replaced by a specific value.
monospace bold
Denotes language keywords when used outside example code.
<and>
Encloses replaceable terms for assembler syntax where they appear in code or code fragments.
For example:
MRC p15, 0, <Rd>, <CRn>, <CRm>, <Opcode_2>
SMALL CAPITALS
Used in body text for a few terms that have specific technical meanings, that are defined in the
ARM glossary. For example, IMPLEMENTATION DEFINED, IMPLEMENTATION SPECIFIC, UNKNOWN, and
UNPREDICTABLE.
Feedback
Feedback on content
If you have comments on content then send an e-mail to [email protected]. Give:
• The title ARM® Compiler Errors and Warnings Reference Guide.
• The number ARM DUI0496L.
• If applicable, the page number(s) to which your comments refer.
• A concise explanation of your comments.
ARM also welcomes general suggestions for additions and improvements.
Note
ARM tests the PDF only in Adobe Acrobat and Acrobat Reader, and cannot guarantee the quality of the
represented document when used with any other PDF reader.
Describes the error and warning messages for the C and C++ compiler, armcc.
It contains the following sections:
• 1.1 Suppressing armcc error and warning messages on page 1-11.
• 1.2 List of the armcc error and warning messages on page 1-12.
Related information
--diag_warning=tag[,tag,...] compiler option.
--strict_warnings compiler option.
-W compiler option.
Note
In ARM Compiler 5.02 and earlier, the IDs for the messages in the form C4XXX were in the range
3000-3499.
0: unknown error
1: last line of file ends without a new line
2: last line of file ends with a backslash
3: #include file <entity> includes itself
4: out of memory
5: cannot open <entity> input file <filename>: <reason>
For example:
#include <file.h>
In this example, the backslash causes the following quote " to be treated as a literal character
rather than closing the string. To fix this, use:
char foo[] = {"\\"};
or:
#include <stdio.h> foo
or:
#ifdef SOMETHING
:
#endif SOMETHING
The #endif does not expect or require any argument. Enclosing the trailing part of the line in a
comment fixes the problem:
#endif /* SOMETHING */
If it is necessary to do this, undefine the macro using #undef before the second definition.
If you want to define a macro, unless it already has a definition, you can use conditional
preprocessing, for example:
#ifndef TEST
#define TEST 0
#endif
Note
This description applies to RVCT 2.2 and later.
C mode:
• the warning is produced but the compiler promotes the constants to unsigned
• the switch --strict always produces this message as an error.
C++ mode:
• by default the out-of-range constants are promoted to unsigned without a warning and also
when --strict is used
As a work around for cases where the message is an error use the following code example:
typedef enum
{
Bit31 = (int)0x80000000
} Bits;
By not declaring a size for the array in the structure, the compiler is not able to allocate a size of
the structure. Incomplete types are permitted in --gnu and --c99 modes.
71: operand of sizeof may not be a bit field
76: argument to macro is empty
77: this declaration has no storage class or type specifier
78: a parameter declaration may not have an initializer
79: expected a type specifier
The ellipses to denote variadic functions, such as printf(), must follow at least one parameter.
For example, change:
int foo( ... );
to:
int foo( int bar, ... );
or:
void bar(void){
int a=0;
break;
}
The name array can hold up to 5 characters. "Hello" does not fit because C strings are always
null-terminated (for example, "Hello\0"). The compiler reports:
Error: #144: a value of type "const char [6]" cannot be used to initialize an entity
of type "char [5]"
A similar error is also raised if there is an implicit cast of non-zero int to pointer.
For example:
void foo_func( void )
{
char *foo=1;
}
For the cast, this error can be suppressed with the use of the --loose_implicit_cast switch.
145: <entity> may not be initialized
146: too many initializer values
147: declaration is incompatible with <entity>
The following incorrect C code causes an error in all modes. This can be downgraded from an
error to a warning by using --diag_warning 147, or suppressed completely by using
--diag_suppress 147.
typedef enum { e } E;
typedef enum { f } F;
E g(void);
F g(void);
or alternatively:
unsigned int foo = 0x1234;
printf("%0X", foo);
%0X can be used for char, short or int. Use lX for a long integer, even though both ints and
longs are 32-bits wide on an ARM processor.
182: could not open source file <entity> (no directories in search list)
183: type of cast must be integral
184: type of cast must be arithmetic or pointer
185: dynamic initialization in unreachable code
186: pointless comparison of unsigned integer with zero
For example:
unsigned short foo;
if (foo<0) printf("This never happens");
gives a warning that the comparison between an unsigned value, for example char or int, with
zero always evaluates to false.
187: use of "=" where "==" may have been intended
For example:
int main(void)
{
int a;
const int b =1;
if (a=b);
}
If the assignment in the if statement is intentional, then you can avoid the warning by adding an
explicit comparison. For example, change the if statement in the example to:
if ((a=b)!=0);
is equivalent to:
val2 = (float)val1;
In character and string escapes, if the character following the \ has no special meaning, the value
of the escape is the character itself, for example, \s is the same as s and the warning is given.
193: zero used for undefined preprocessing identifier <entity>
194: expected an asm string
195: an asm function must be prototyped
196: an asm function may not have an ellipsis
219: error while deleting file <entity>
220: integral value does not fit in required floating-point type
221: floating-point value does not fit in required floating-point type
222: floating-point operation result is out of range
223: function <entity> declared implicitly
This is a common warning that occurs where there is no prototype for a function.
For example:
void foo(void)
{
printf("foo");
}
To fix this, add #include <stdio.h> to include the prototype for printf().
For ANSI C, you can suppress this warning with --diag_suppress 223. This is useful when
compiling old-style C in ANSI C mode.
224: the format string requires additional arguments
225: the format string ends before this argument
226: invalid format string conversion
227: macro recursion
228: trailing comma is nonstandard
229: bit field cannot contain all values of the enumerated type
230: nonstandard type for a bit field
In strict ANSI C90, the only types permitted for a bit field are int, signed int, and unsigned
int.
For example:
struct X {
char y:2;
};
Tentative declarations are permitted by default for C code, but produce an error with C++ code.
248: pointer to reference is not allowed
249: reference to reference is not allowed
250: reference to void is not allowed
251: array of reference is not allowed
252: reference <entity> requires an initializer
253: expected a ","
254: type name is not allowed
This occurs when a typedef name is being used directly in an expression, for example:
typedef int footype;
int x = footype; // reports Error: #254: type name is not allowed
To fix this, first create an instance of that type, for example, a variable of the new type:
typedef int footype;
footype bar = 1;
int x = bar;
338: more than one instance of overloaded function <entity> has "C" linkage
339: class <type> has more than one default constructor
340: value copied to temporary, reference to temporary used
341: "operator<entity>" must be a member function
342: operator may not be a static member function
343: no arguments allowed on user-defined conversion
344: too many parameters for this operator function
345: too few parameters for this operator function
346: nonmember operator requires a parameter with class type
347: default argument is not allowed
348: more than one user-defined conversion from <type> to <type> applies:
349: no operator <entity> matches these operands
350: more than one operator <entity> matches these operands:
351: first parameter of allocation function must be of type "size_t"
352: allocation function requires "void *" return type
353: deallocation function requires "void" return type
354: first parameter of deallocation function must be of type "void *"
356: type must be an object type
357: base class <type> has already been initialized
358: base class name required -- <type> assumed (anachronism)
359: <entity> has already been initialized
360: name of member or base class is missing
361: assignment to "this" (anachronism)
362: "overload" keyword used (anachronism)
363: invalid anonymous union -- nonpublic member is not allowed
364: invalid anonymous union -- member function is not allowed
365: anonymous union at global or namespace scope must be declared static
366: <entity> provides no initializer for:
367: implicitly generated constructor for class <type> cannot initialize:
368: <entity> defines no constructor to initialize the following:
This indicates that you have a const structure or a structure containing a const. It is issued as a
friendly warning to assist with error 369. This can safely be ignored providing that the const
members of structures are appropriately initialized.
In this example, y is an initialized variable that is in scope but is unused in the other cases. A
transfer from the condition of the switch statement to a case label, bypassing the initialization
of y, conflicts with the C++ Standard.
The usual way to fix this is to enclose the case that declares y in braces. The following code
limits the scope of y to case 1, so an attempt to use it elsewhere causes an error:
case 1: {
int y = 1;
z = y + z;
}
break;
Because y is a Plain Old Data (POD) type, an alternative is to not use initialization:
case 1:
int y;
y = 1;
z = y + z;
break;
This approach has the disadvantage that if code outside of case 1 uses y, and accidentally
expects it to have the value assigned in case 1, no warning is given.
548: transfer of control into an exception handler
549: <entity> is used before its value is set
550: <entity> was set but never used
551: <entity> cannot be defined in the current scope
552: exception specification is not allowed
553: external/internal linkage conflict for <entity>
554: <entity> will not be called for implicit or explicit conversions
555: tag kind of <entity> is incompatible with template parameter of type <type>
556: function template for operator new(size_t) is not allowed
558: pointer to member of type <type> is not allowed
559: ellipsis is not allowed in operator function parameter list
560: <entity> is reserved for future use as a keyword
561: invalid macro definition:
562: invalid macro undefinition:
563: invalid <entity> output file <filename>
564: cannot open <entity> output file <filename>: <reason>
570: error in debug option argument
571: invalid option:
574: invalid number:
576: invalid instantiation mode:
578: invalid error limit:
585: virtual function tables can only be suppressed when compiling C++
586: anachronism option can be used only when compiling C++
587: instantiation mode option can be used only when compiling C++
588: automatic instantiation mode can be used only when compiling C++
589: implicit template inclusion mode can be used only when compiling C++
590: exception handling option can be used only when compiling C++
593: missing source file name
594: output files may not be specified when compiling several input files
595: too many arguments on command line
596: an output file was specified, but none is needed
598: a template parameter may not have void type
600: strict mode is incompatible with allowing anachronisms
601: a throw expression may not have void type
602: local instantiation mode is incompatible with automatic instantiation
603: parameter of abstract class type <type> is not allowed:
604: array of abstract class <type> is not allowed:
605: floating-point template parameter is nonstandard
606: this pragma must immediately precede a declaration
607: this pragma must immediately precede a statement
608: this pragma must immediately precede a declaration or statement
609: this kind of pragma may not be used here
611: overloaded virtual function <entity> is only partially overridden in <entity>
612: specific definition of inline template function must precede its first use
613: invalid error tag in diagnostic control option:
614: invalid error number in diagnostic control option:
615: parameter type involves pointer to array of unknown bound
616: parameter type involves reference to array of unknown bound
617: pointer-to-member-function cast to pointer to function
618: struct or union declares no named members
619: nonstandard unnamed field
620: nonstandard unnamed member
624: <entity> is not a type name
625: cannot open precompiled header input file <entity>: <reason>
626: precompiled header file <entity> is either invalid or not generated by this
version of the compiler
627: precompiled header file <entity> was not generated in this directory
628: header files used to generate precompiled header file <entity> have changed
629: the command line options do not match those used when precompiled header file
<entity> was created
630: the initial sequence of preprocessing directives is not compatible with those of
precompiled header file <entity>
631: unable to obtain mapped memory for <entity>: <reason>
This can occur if you are trying to use a large Precompiled Header (PCH), and you have a size
limitation on the TMP directory that the ARM Compiler toolchain uses. A possible workaround is
to remove the TMP environment variable. This forces the tools to create temporary files in the
current working directory.
See the following in the Getting Started Guide:
TMP and TMPDIR environment variables for temporary file directories.
632: "<entity>": using precompiled header file "<entity>"
633: "<entity>": creating precompiled header file "<entity>"
634: memory usage conflict with precompiled header file <entity>
This can occur if a PCH file cannot be mapped back into the build because the required parts of
the address space of the compiler are not available.
See also error 631.
635: invalid PCH memory size
636: PCH options must appear first in the command line
637: insufficient memory for PCH memory allocation
638: precompiled header files may not be used when compiling several input files
639: insufficient preallocated memory for generation of precompiled header file
(<entity> bytes required)
640: very large entity in program prevents generation of precompiled header file
641: <entity> is not a valid directory
642: cannot build temporary file name
643: "restrict" is not allowed
644: a pointer or reference to function type may not be qualified by "restrict"
645: <entity> is an unrecognized __declspec attribute
646: a calling convention modifier may not be specified here
647: conflicting calling convention modifiers
650: calling convention specified here is ignored
651: a calling convention may not be followed by a nested declarator
652: calling convention is ignored for this type
654: declaration modifiers are incompatible with previous declaration
655: the modifier <entity> is not allowed on this declaration
656: transfer of control into a try block
657: inline specification is incompatible with previous <entity>
658: closing brace of template definition not found
659: wchar_t keyword option can be used only when compiling C++
660: invalid packing alignment value
661: expected an integer constant
662: call of pure virtual function
A pure virtual function is being called, for example:
struct T { T(); virtual void pvfn() = 0; };
// a pure virtual function
T::T() { pvfn(); } // warning given here
692: <entity>, required for copy that was eliminated, is not callable because
reference parameter cannot be bound to rvalue
693: <typeinfo> must be included before typeid is used
694: <entity> cannot cast away const or other type qualifiers
695: the type in a dynamic_cast must be a pointer or reference to a complete class
type, or void *
696: the operand of a pointer dynamic_cast must be a pointer to a complete class type
697: the operand of a reference dynamic_cast must be an lvalue of a complete class
type
698: the operand of a runtime dynamic_cast must have a polymorphic class type
699: bool option can be used only when compiling C++
702: expected an "="
703: expected a declarator in condition declaration
704: <entity>, declared in condition, may not be redeclared in this scope
705: default template arguments are not allowed for function templates
706: expected a "," or ">"
707: expected a template parameter list
708: incrementing a bool value is deprecated
709: bool type is not allowed
710: offset of base class <entity> within class <entity> is too large
711: expression must have bool type (or be convertible to bool)
712: array new and delete option can be used only when compiling C++
713: <entity> is not a variable name
717: the type in a const_cast must be a pointer, reference, or pointer to member to
an object type
718: a const_cast can only adjust type qualifiers; it cannot change the underlying
type
719: mutable is not allowed
720: redeclaration of <entity> is not allowed to alter its access
722: use of alternative token "<:" appears to be unintended
723: use of alternative token "%:" appears to be unintended
724: namespace definition is not allowed
725: name must be a namespace name
726: namespace alias definition is not allowed
727: namespace-qualified name is required
728: a namespace name is not allowed
730: <entity> is not a class template
731: array with incomplete element type is nonstandard
732: allocation operator may not be declared in a namespace
733: deallocation operator may not be declared in a namespace
734: <entity> conflicts with using-declaration of <entity>
735: using-declaration of <entity> conflicts with <entity>
736: namespaces option can be used only when compiling C++
737: using-declaration ignored -- it refers to the current namespace
738: a class-qualified name is required
744: incompatible memory attributes specified
745: memory attribute ignored
746: memory attribute may not be followed by a nested declarator
747: memory attribute specified more than once
748: calling convention specified more than once
749: a type qualifier is not allowed
750: <entity> was used before its template was declared
751: static and nonstatic member functions with same parameter types cannot be
overloaded
752: no prior declaration of <entity>
753: a template-id is not allowed
804: cannot convert pointer to member of base class <type> to pointer to member of
derived class <type> -- base class is virtual
805: exception specification is incompatible with that of <entity><entity>
806: omission of exception specification is incompatible with <entity>
807: unexpected end of default argument expression
808: default-initialization of reference is not allowed
809: uninitialized <entity> has a const member
810: uninitialized base class <type> has a const member
811: const <entity> requires an initializer -- class <type> has no explicitly
declared default constructor
812: const object requires an initializer -- class <type> has no explicitly declared
default constructor
814: strict mode is incompatible with long preserving rules
815: type qualifier on return type is meaningless
For example:
__packed void foo( void ) { }
The __packed qualifier is ignored because the return type cannot be __packed.
816: in a function definition a type qualifier on a "void" return type is not allowed
817: static data member declaration is not allowed in this class
818: template instantiation resulted in an invalid function declaration
819: "..." is not allowed
821: extern inline <entity> was referenced but not defined
822: invalid destructor name for type <type>
824: destructor reference is ambiguous -- both <entity> and <entity> could be used
825: <entity> could be used
826: <entity> was never referenced
827: only one member of a union may be specified in a constructor initializer list
828: support for "new[]" and "delete[]" is disabled
829: "double" used for "long double" in generated C code
830: <entity> has no corresponding operator delete<entity> (to be called if an
exception is thrown during initialization of an allocated object)
831: support for placement delete is disabled
832: no appropriate operator delete is visible
833: pointer or reference to incomplete type is not allowed
834: invalid partial specialization -- <entity> is already fully specialized
835: incompatible exception specifications
836: returning reference to local variable
837: omission of explicit type is nonstandard ("int" assumed)
A function has been declared or defined with no return type.
Example, with the code:
foo(void){
int a;
}
921: an instantiation information file name may not be specified when compiling
several input files
923: more than one command line option matches the abbreviation "--<entity>":
925: type qualifiers on function types are ignored
926: cannot open definition list file: <entity>
928: incorrect use of va_start
929: incorrect use of va_arg
930: incorrect use of va_end
931: pending instantiations option can be used only when compiling C++
932: invalid directory for #import files:
934: a member with reference type is not allowed in a union
935: "typedef" may not be specified here
936: redeclaration of <entity> alters its access
937: a class or namespace qualified name is required
938: return type "int" omitted in declaration of function "main"
main() has been declared or defined with no return type.
For example:
main(void){
int a;
}
960: type used as constructor name does not match type <type>
961: use of a type with no linkage to declare a variable with linkage
962: use of a type with no linkage to declare a function
963: return type may not be specified on a constructor
964: return type may not be specified on a destructor
965: incorrectly formed universal character name
966: universal character name specifies an invalid character
967: a universal character name cannot designate a character in the basic character
set
968: this universal character is not allowed in an identifier
969: the identifier __VA_ARGS__ can only appear in the replacement lists of variadic
macros
970: the qualifier on this friend declaration is ignored
971: array range designators cannot be applied to dynamic initializers
972: property name cannot appear here
975: a variable-length array type is not allowed
976: a compound literal is not allowed in an integral constant expression
977: a compound literal of type <type> is not allowed
978: a template friend declaration cannot be declared in a local class
979: ambiguous "?" operation: second operand of type <type> can be converted to third
operand type <type>, and vice versa
980: call of an object of a class type without appropriate operator() or conversion
functions to pointer-to-function type
982: there is more than one way an object of type <type> can be called for the
argument list:
983: typedef name has already been declared (with similar type)
984: operator new and operator delete cannot be given internal linkage
985: storage class "mutable" is not allowed for anonymous unions
986: invalid precompiled header file
987: abstract class type <type> is not allowed as catch type:
988: a qualified function type cannot be used to declare a nonmember function or a
static member function
989: a qualified function type cannot be used to declare a parameter
990: cannot create a pointer or reference to qualified function type
991: extra braces are nonstandard
992: invalid macro definition:
Incorrect use of -D on the compile line, for example, "-D##"
993: subtraction of pointer types <type> and <type> is nonstandard
994: an empty template parameter list is not allowed in a template template parameter
declaration
995: expected "class"
996: the "class" keyword must be used when declaring a template template parameter
997: <entity> is hidden by <entity> -- virtual function override intended?
998: a qualified name is not allowed for a friend declaration that is a function
definition
999: <entity> is not compatible with <entity>
1000: a storage class may not be specified here
1001: class member designated by a using-declaration must be visible in a direct base
class
1006: a template template parameter cannot have the same name as one of its template
parameters
1007: recursive instantiation of default argument
1009: <entity> is not an entity that can be defined
1010: destructor name must be qualified
1011: friend class name may not be introduced with "typename"
1012: a using-declaration may not name a constructor or destructor
1025 : __svc parameter <entity> is not within permitted range (0 to 0xffffff) for ARM
SVC instruction
SVC numbers are limited to the range 0 to 0xffffff for ARM code, and 0 to 0xFF for Thumb
code.
For standard semihosting SVCs, 0x123456 is used for ARM code and 0xAB is used for Thumb
code.
1026: taking the address of a global register variable is not allowed
1027: __svc_indirect function must have arguments
1028: conflicting global register declaration with <entity>
1029: __packed ignored for non-pointer parameter
1030: <entity> <type> previously declared without __packed
1031: Definition of <type> in packed <type> must be __packed
The compiler faults a non-packed child structure contained in a packed parent structure. This
includes the case where the substructure is an array.
For example:
typedef struct ChildStruct {
int a;
} ChildStruct;
typedef __packed struct ParentStruct {
ChildStruct child[1];
} ParentStruct;
__align is not permitted for a local variable foo, so the error is given.
When the compiler is in ROPI or RWPI mode, it disallows const objects from containing
mutable members.
The reason for this restriction is that in these modes, the compiler addresses read-only data
differently from read-write data. It therefore must know whether an object is in the RO or RW
data section. In the following example, this restriction means that bar cannot contain any
mutable members and is therefore in the RO data section:
struct foo;
extern const struct foo bar;
const struct foo *get_foo() { return &bar; }
results in an error message because the saturated add instruction is only supported in ARMv5TE
and later.
1115: Cannot assign to const operand
1116: Register list cannot be empty
1117: Unqualified virtual function not allowed
1118: Expected a newline
1119: Reference to static variable not allowed in __asm function
1120: Reference to static function not allowed in __asm function
1121: Pointer to data member not allowed in __asm function
1122: __asm function cannot have static qualifier
1123: base class <type> is a virtual base class of <type>
1124: base class <type> is not virtual base class of <type>
1125: <entity> has no member function <entity>
1126: "__asm" is not allowed in this declaration
1127: Member initializer list not permitted for __asm constructors
1128: try block not permitted for __asm constructors
1129: Order of operands not compatible with previous compiler versions
1130: __align not permitted in typedef
1131: Non portable instruction (LDM with writeback and base in reg. list, final value
of base unpredictable)
1132: Non portable instruction (STM with writeback and base not first in reg. list,
stored value of base unpredictable)
1133: Expression operands not permitted with virtual base register
gives a warning because 2147483648 is one greater than the maximum value permitted for a
signed long. To eliminate the warning, if the constant should be treated as a (64-bit) long
long type rather than a signed long, explicitly add an ll or LL suffix, or, if it should be treated
as an unsigned integer, add a U suffix.
For example:
int foo(unsigned int bar)
{
return (bar == 2147483648U);
}
1220: <type> cannot be transparent because it has a field of type <type> which is not
the same size as the union
1221: only parameters can be transparent
1222: the <entity> attribute does not apply to local variables
1224: attributes are not permitted in a function definition
1225: declarations of local labels should only appear at the start of statement
expressions
1226: the second constant in a case range must be larger than the first
1227: an asm name is not permitted in a function definition
1228: an asm name is ignored in a typedef
1229: unknown register name "<entity>"
1230: modifier letter '<entity>' ignored in asm operand
1231: unknown asm constraint modifier '<entity>'
1232: unknown asm constraint letter '<entity>'
1233: asm operand has no constraint letter
1234: an asm output operand must have one of the '=' or '+' modifiers
1235: an asm input operand may not have the '=' or '+' modifiers
1236: too many operands to asm statement (maximum is 30; '+' modifier adds an
implicit operand)
1237: too many colons in asm statement
1238: register "<entity>" used more than once
1239: register "<entity>" is both used and clobbered
1240: register "<entity>" clobbered more than once
1241: register "<entity>" has a fixed purpose and may not be used in an asm statement
1242: register "<entity>" has a fixed purpose and may not be clobbered in an asm
statement
1243: an empty clobbers list must be omitted entirely
1244: expected an asm operand
1245: expected a register to clobber
1246: "format" attribute applied to <entity> which does not have variable arguments
1247: first substitution argument is not the first variable argument
1248: format argument index is greater than number of parameters
1249: format argument does not have string type
1250: the "template" keyword used for syntactic disambiguation may only be used
within a template
1253: attribute does not apply to non-function type <type>
1254: arithmetic on pointer to void or function type
1255: storage class must be auto or register
1256: <type> would have been promoted to <type> when passed through the ellipsis
parameter; use the latter type instead
1257: <entity> is not a base class member
1262: mangled name is too long
1263: Offset must be half-word aligned
1264: Offset must be double-word aligned
1265: converting to and from floating-point type is not permitted with --fpu=none
1266: Operand should be a constant expression
1267: Implicit physical register <entity> should be defined as a variable
1268: declaration aliased to unknown entity <entity>
1269: declaration does not match its alias <entity>
1270: entity declared as alias cannot have definition
1271: variable-length array field type will be treated as zero-length array field
type
1272: nonstandard cast on lvalue not supported
1273: unrecognized flag name
1274: void return type cannot be qualified
1275: the auto specifier is ignored here (invalid in standard C/C++)
The optimization stage normally changes the LDR or STR instructions back into LDM or STM
instructions, although it is possible that in some cases a single LDM or STM instruction is not used.
1288: Implicit ARM register <entity> was not defined due to name clash
1289: statement expressions are only allowed in block scope
1291: an asm name is ignored on a non-register automatic variable
1292: inline function also declared as an alias; definition ignored
1293: assignment in condition
In a context where a boolean value is required, for example in the controlling expression for an
if, while, or for statement, or the first operand of a conditional expression, the expression
contains one of the following instead:
• A bitwise not operator (~). It is likely that a logical not operator (!) was intended.
• An assignment operator (=). This could be a mis-typed equality operator (==). For example:
int main(void)
{
int a,b;
if (a=b);
}
In either case, if the operator was used intentionally, it might be possible to suppress the warning
by adding an explicit comparison against zero.
For example, change the if statement in the example to:
if ((a=b)!=0);
This warning can also be suppressed by using the --diag_suppress 1293 option.
See also message number 187, which applies when you compare against a constant.
means:
void foo(void);
ANSI C requires the initializer for a static object to be a constant expression. (int) &x is not
considered to be a constant expression.
Be aware that addresses are not arithmetic types, so this example C code is disallowed for ANSI
C. Unfortunately, this is a common ANSI non-compliance amongst other compilers, and can
result in problems when porting legacy code to ARM. This is why the ARM compiler issues a
warning rather than an error.
An ANSI C compliant alternative method would be to rewrite the code so that y is a pointer to x:
int x;
int* y = &x;
Example 2:
This code, compiled with the --c90 switch, generates warning 1296:
const int foo_table[] = { (int)"foo", 0, 1, 2};
Example 3:
This code generates warning 1296 because the C standard does not permit a cast of a pointer to a
long integer in a constant expression:
char value;
long array[] = {
(long)&value,
(long)"string"
};
An ANSI C compliant alternative method would be to rewrite the code to use pointers:
char value;
char *array[] = {
(char*)&value,
(char*)"string"
};
To correct the code, remove the comment slashes (//). This warning is off by default. It can be
enabled with:
--diag_warning 1298
Adding the virtual keyword in the derived class prevents the warning. For C++, specifying the
--diag_suppress 1300 option suppresses the implicit virtual warning.
For example:
struct X {
char x;
int y;
}
The compiler can also warn of padding added at the end of a struct or between structs, see
message number 2530.
1302: type too large to be returned in registers - __value_in_regs ignored
1303: using --force_new_nothrow: added "throw()"
1304: operator new missing exception specification
1305: using --force_new_nothrow: added "(::std::nothrow)"
1307: floating point argument not permitted with -fpu=none
1308: Base class <type> of __packed class <type> must be __packed
1310: shared block size does not match one previously specified
1311: bracketed expression is assumed to be a block size specification rather than an
array dimension
1312: the block size of a shared array must be greater than zero
1313: multiple block sizes not allowed
1314: strict or relaxed requires shared
1316: block size specified exceeds the maximum value of <entity>
1317: function returning shared is not allowed
1320: shared type inside a struct or union is not allowed
1321: parameters may not have shared types
1323: shared variables must be static or extern
1327: affinity expression must have a shared type or point to a shared type
1328: affinity has shared type (not pointer to shared)
1329: shared void* types can only be compared for equality
1331: null (zero) character in input line ignored
1332: null (zero) character in string or character constant
1333: null (zero) character in header name
1334: declaration in for-initializer hides a declaration in the surrounding scope
1335: the hidden declaration is <entity>
1336: the prototype declaration of <entity> is ignored after this unprototyped
redeclaration
1338: <entity> must have external C linkage
1339: variable declaration hides declaration in for-initializer
1340: typedef <entity> may not be used in an elaborated type specifier
1341: call of zero constant ignored
1342: parameter <entity> may not be redeclared in a catch clause of function try
block
1343: the initial explicit specialization of <entity> must be declared in the
namespace containing the template
1345: "template" must be followed by an identifier
1347: layout qualifier cannot qualify pointer to shared
1348: layout qualifier cannot qualify an incomplete array
1349: declaration of <entity> hides handler parameter
1350: nonstandard cast to array type ignored
1351: this pragma cannot be used in a _Pragma operator (a #pragma directive must be
used)
1352: field uses tail padding of a base class
1353: GNU C++ compilers may use bit field padding
1354: memory mapping conflict with precompiled header file <entity>
1355: abstract class <type> has a non-virtual destructor, calling delete on a pointer
to this class is undefined behaviour
1356: an asm name is not allowed on a nonstatic member declaration
1357: static initialisation of <entity> using address of <entity> may cause link
failure <option>
See error number 1359.
1358: static initialisation of extern const <entity> using address of <entity> cannot
be lowered for ROPI
1359: static initialisation of <entity> using address of <entity> may cause link
failure <option>
Warnings 1357 and 1359 highlight code constructs that are not position independent (PI) and
that might cause a subsequent link step to fail.
The following code, when compiled with --apcs /ropi:
char *str = "test"; /* global pointer */
because the global pointer str must be initialized to the address of the char string test in
the .constdata section, but absolute addresses cannot be used in a PI system.
The following code, when compiled with --apcs /rwpi:
int bar;
int *foo = &bar; /* global pointer */
because the global pointer foo must be initialized to the address of bar in the .data section, but
absolute addresses cannot be used in a PI system.
The following workarounds are possible:
• Change your code to avoid use of a global pointer. You can, for example, use a global array
or local pointer instead.
• Do the initialization at run-time, for example:
int bar;
int *foo;
Then write code inside a function that sets foo = &bar;. This is because when generating
code as opposed to statically initializing data, the compiler has scope to work around the
ROPI/RWPI constraints.
See also the linker error L6248E.
1360: static initialisation of extern const <entity> using address of <entity> cannot
be lowered for RWPI
For example, when compiled with --apcs /rwpi:
extern int y;
int* const x = &y;
int* foo()
{
return(x);
}
produces a warning because prefixing y by extern prevents the compiler defining a direct
address offset between the variables x and y.
1361: <entity> was declared "deprecated"
1362: unrecognized format function type <entity> ignored
1363: base class <entity> uses tail padding of base class <entity>
1366: this anonymous union/struct field is hidden by <entity>
1367: invalid error number
1368: invalid error tag
1369: expected an error number or error tag
1370: size of class is affected by tail padding
1371: labels can be referenced only in function definitions
---test.cpp---
__declspec(dllimport) void foo();
void foo()
{
}
------------
armcc -c test.cpp
"test.cpp", line 3: Warning: #1559-D: dllexport/dllimport conflict with "foo"
(declared at line 1); dllexport assumed
fromelf –s test.o
...
# Symbol Name Value Bind Sec Type Vis Size
====================================================================
6 _Z3foov 0x00000000 Gb 1 Code Pr 0x4
...
The warning message and the symbol visibility indicate that the function foo() is dllexport
assumed.
1560: cannot define dllimport entity
1561: dllexport/dllimport requires external linkage
1562: a member of a class declared with dllexport/dllimport cannot itself be declared
with such a specifier
1563: field of class type without a DLL interface used in a class with a DLL
interface
1564: parenthesized member declaration is nonstandard
1565: white space between backslash and newline in line splice ignored
1947: Could not optimize: Cannot transform this combination of data types and
operations
1978: Could not optimize: Unable to optimize user-selected loop
1979: Could not optimize: This operation inhibits loop transformation
1987: Optimization: Loop switched
1988: Optimization: Alternate code generated
1997: Optimization: Constant-length loop unrolled
2091: Optimization: Loop unrolled
2168: Optimization: Outer loop moved inside inner loop(s)
2170: Optimization: Invariant expression moved outside of outer loop
2189: Optimization: Loop unrolled and rotated
2190: Optimization: Loop unrolled and optimized
2191: Optimization: Some loads lifted to top of loop
2218: Idiom detected and optimized
2300: Might not be able to optimize: Feedback of scalar value from one loop pass to
another. Conflict on line <entity>. Loop index is <entity> (<filename>,<entity>)"
2301: Might not be able to optimize: Feedback of scalar value from one loop pass to
another. Conflict on line <entity>. Loop index is <entity> (<filename>)
2302: Might not be able to optimizee: Feedback of scalar value from one loop pass to
another. Conflict on line <entity>. (<entity>,<filename>)
2303: Might not be able to optimize: Feedback of scalar value from one loop pass to
another. Conflict on line <entity>. (<entity>)
2304: Might not be able to optimize: Potential multiple store conflict between loop
iterations. Conflict on line <entity>. Loop index is <entity> (<filename>,<entity>)
2305: Might not be able to optimize: Potential multiple store conflict between loop
iterations. Conflict on line <entity>. Loop index is <entity> (<filename>)
2306: Might not be able to optimize: Potential multiple store conflict between loop
iterations. Conflict on line <entity>. (<entity>,<filename>)
2307: Might not be able to optimize: Potential multiple store conflict between loop
iterations. Conflict on line <entity>. (<entity>)
2308: Might not be able to optimize: Potential feedback between loop iterations.
Conflict on line <entity>. Loop index is <entity> (<filename>,<entity>)
2309: Might not be able to optimize: Potential feedback between loop iterations.
Conflict on line <entity>. Loop index is <entity> (<filename>)
2310: Might not be able to optimize: Potential feedback between loop iterations.
Conflict on line <entity>. (<entity>,<filename>)
2311: Might not be able to optimize: Potential feedback between loop iterations.
Conflict on line <entity>. (<entity>)
2312: Could not optimize: Potential pointer aliasing - use restrict qualifier if ok.
Conflict on line <entity>. Loop index is <entity> (<filename>,<entity>)
2313: Could not optimize: Potential pointer aliasing - use restrict qualifier if ok.
Conflict on line <entity>. Loop index is <entity> (<filename>)
2314: Could not optimize: Potential pointer aliasing - use restrict qualifier if ok.
Conflict on line <entity>. (<entity>,<filename>)
2315: Could not optimize: Potential pointer aliasing - use restrict qualifier if ok.
Conflict on line <entity>. (<entity>)
2351: Loop nest fused with following nest(s)
2438: Could not inline: Void function used in expression
2439: Could not inline: Identifier declaration
2442: Could not inline: Cannot remove function from expression
2516: High Level Optimization halted: assembly code in routine
2519: Unable to determine constant iteration count for this loop
Each pop must be paired with a push, so an error is raised for the following code:
#pragma push
;
#pragma pop
;
#pragma pop
The compiler can also warn of padding inserted within a struct, see message number 1301.
2531: dllimport/dllexport applied to a member of an unnamed namespace
2533: the <entity> attribute can only appear on functions and variables with external
linkage
2534: strict mode is incompatible with treating namespace std as an alias for the
global namespace
2535: in expansion of macro "<entity>" <entity>,
2537: in expansion of macro "<entity>" <entity><entity>
2540: invalid symbolic operand name <entity>
2541: a symbolic match constraint must refer to one of the first ten operands
2544: thread-local variable cannot be dynamically initialized
2546: some enumerator values cannot be represented by the integral type underlying
the enum type
2547: default argument is not allowed on a friend class template declaration
2548: multicharacter character literal (potential portability problem)
2549: expected a class, struct, or union type
2550: second operand of offsetof must be a field
2551: second operand of offsetof may not be a bit field
2552: cannot apply offsetof to a member of a virtual base
2553: offsetof applied to non-POD types is nonstandard
2554: default arguments are not allowed on a friend declaration of a member function
2555: default arguments are not allowed on friend declarations that are not
definitions
2556: redeclaration of <entity> previously declared as a friend with default
arguments is not allowed
2557: invalid qualifier for <type> (a derived class is not allowed here)
2558: invalid qualifier for definition of class <type>
2560: wide string literal not allowed
2565: template argument list of <entity> must match the parameter list
2566: an incomplete class type is not allowed
2567: complex integral types are not supported
2570: <entity> was declared "deprecated (<entity>)"
2571: invalid redefinition of <entity>
2574: explicit specialization of <entity> must precede its first use (<entity>)
2575: a sealed class type cannot be used as a base class
2576: duplicate class modifier
2577: a member function cannot have both the "abstract" and "sealed" modifiers
2578: a sealed member cannot be pure virtual
2579: nonvirtual function cannot be declared with "abstract" or "sealed" modifier
2580: member function declared with "override" modifier does not override a base
class member
2581: cannot override sealed <entity>
2582: <entity> was declared with the class modifier "abstract"
2662: unrecognized calling convention <entity>, must be one of:
2665: attribute <entity> not allowed on parameter declarations
2666: underlying type of enum type must be an integral type other than bool
2667: some enumerator constants cannot be represented by <type>
2668: <entity> not allowed in current mode
2676: no #pragma start_map_region is currently active: pragma ignored
2677: <entity> cannot be used to name a destructor (a type name is required)
2678: nonstandard empty wide character literal treated as L'\\0'
2679: "typename" may not be specified here
2680: a non-placement operator delete must be visible in a class with a virtual
destructor
2681: name linkage conflicts with previous declaration of <entity>
2682: alias creates cycle of aliased entities
2683: subscript must be constant
2684: a variable with static storage duration allocated in a specific register cannot
be declared with an initializer
2685: a variable allocated in a specific register must have POD type
2686: predefined meaning of <entity> discarded
2687: declaration hides built-in <entity>
2688: declaration overloads built-in <entity>
2689: static member function not permitted here
2690: the <entity> attribute can only appear on functions and variables with internal
linkage
2751: routine is both "inline" and "noinline"
2813: empty dependent statement in if-statement
This remark indicates that an if statement has no dependent statement, and is not followed by
an else statement. For example:
if (x <= 0); // remark 2813 is generated here
{
foo(x);
}
You can enable this remark by using --diag_warning 2813 or --remarks. When using the
--remarks option, you can suppress this remark by using --diag_suppress 2813.
You can enable this remark by using --diag_warning 2815 or --remarks. When using the
--remarks option, you can suppress this remark by using --diag_suppress 2815.
2902: unrecognized Unicode source kind (must be one of UTF-8, UTF-16, UTF-16LE,
UTF-16BE)
2903: Unicode character with hex value <entity> not representable in preprocessing
output
2917: cannot open <entity> file <entity>
2918: cannot open <entity> file <entity>: <entity>
2934: conversion drops "__restrict" qualifier
2935: unable to obtain mapped memory for <entity>: <entity>
2936: array of elements containing a flexible array member is nonstandard
2938: the initialization of <entity> will be done before that of <entity>
In the C++ standard, member variables are initialized in the order they are declared in the
class, not in the order they are written in the initializer list. The compiler produces this warning
when the order of the initializations in the initializer list does not match the order of declarations
in the class. You can enable this warning with --diag_warning 2938 or --remarks.
For example:
class Foo {
int x;
char y;
public:
Foo() : y(42), x(32) {}
};
3170: an initializer cannot be specified for a flexible array member with automatic
storage duration
3172: a "final" class type cannot be used as a base class
3173: exported templates are no longer in the standard C++ language
3174: a template-dependent designator is not allowed
3175: second operand of offsetof may not be a field with reference type
3176: long lifetime temporaries are incompatible with other requested newer language
features
3177: wide character string literal will not be quoted in diagnostics
3178: missing arguments for attribute <attribute>
3179: options "c++11" and "c++11_sfinae" require a different compiler configuration
3180: template parameter pack not at end of parameter list
3181: a parameter pack declaration is not allowed here
3182: a parameter pack cannot have a default
3184: "value__" cannot be used as the name of an enumerator constant (it is a
reserved name in this context)
3185: an explicit enumerator value is required in an enumeration type with boolean
underlying type
3187: parameter pack <entity> was referenced but not expanded
3188: pack expansion does not make use of any argument packs
3189: pack <entity> does not have the same number of elements as <entity>
3191: vector_size attribute is not allowed with an enumeration type
3192: a property cannot be both static and virtual
3193: an indexed property cannot be trivial
3194: this declaration cannot appear in a property definition
3195: a qualified function type cannot be used to declare an accessor function
3196: an accessor function cannot have an ellipsis parameter
3197: a "get" accessor was already declared for this property <property>
3198: a "set" accessor was already declared for this property <property>
3199: a "get" accessor cannot have a parameter
3200: return type of "get" accessor does not match property type
3201: return type of "set" accessor must be void
3202: a property cannot declare an empty list of indices
3203: a property index cannot have type void
3204: index type does not match the corresponding parameter in the "set" accessor
3205: index type does not match the corresponding parameter in the "get" accessor
3206: index type is missing in the "set" accessor
3207: index type is missing in the "get" accessor
3208: "set" accessor is missing its value parameter
3209: accessor function has too many parameters
3210: the last parameter of the "set" accessor does not match the property type
3213: #using may only be used at global scope
3214: member name <entity> is reserved by <entity>
3215: expected a "["
3217: a default-indexed property cannot be static
3218: a property accessor cannot be both static and virtual
3219: a top-level visibility specifier cannot appear on a nested type declaration
3220: a top-level visibility specifier requires a type definition
3221: a trivial property cannot have a reference type
3222: a trivial property cannot have a const or volatile type
3223: <entity> was previously declared as a different kind of enumeration type
3226: array of handles is not allowed
3227: handle to array is not allowed
3228: handle to function is not allowed
3229: handle to void is not allowed
3230: handle to handle, pointer, or reference is not allowed
3346: a reference of type <type> cannot be initialized with a value of type <type>
3360: a property definition must include at least one accessor ("get" or "set")
3361: default-indexed property conflicts with <type>
3362: <entity> cannot be used because it follows a parameter pack and cannot be
deduced from the parameters of <entity>
3363: this pack expansion produced more than one expression, and a single expression
is needed here
3366: an unnamed parameter pack declaration cannot be parenthesized
3367: variadic templates can be enabled only when compiling C++
3371: a generic parameter cannot have a default
3372: a generic can only have type parameters
3373: to be used with "for each" statements, type <type> must provide nonstatic
member function <entity>
3374: "for each" cannot use member <entity> because it is static
3375: in this "for each" statement, no instance of <entity> is callable with an empty
argument list
3376: "for each" cannot use member function "MoveNext" because the return type is
invalid
3377: a "for each" statement cannot operate on an expression of type <type>
3378: to be used with "for each" statements, type <type> must provide a non-indexed
property <property>
3380: in this "for each" statement, <type> is not a valid enumerator (returned by
"GetEnumerator" of <type>)
3381: expected "in"
3382: class <type> has no suitable assignment operator (after operator synthesis)
3383: <entity> is not a generic parameter
3384: <entity> is not a generic parameter of the innermost generic parameter list
3385: invalid generic constraint
3388: only "+=" and "-=" are valid for events
3391: name followed by "::typeid" must be a type name
3397: the operand of a handle dynamic_cast must be a handle to a complete class type
3400: an interior pointer cannot be cast to a native pointer
3401: explicit conversion operators can only be declared in ref and value class types
3402: explicit conversion operator cannot be virtual
3403: expression must have arithmetic or unscoped enum type
3404: expression must have arithmetic, unscoped enum, or pointer type
3405: expression must have integral or unscoped enum type
3406: expression must have integral, unscoped enum, or fixed-point type
3407: a built-in binary operator applied to a scoped enumeration requires two
operands of the same type
3410: new can only be used with simple value types
3412: new cannot be used on a handle type
3416: too many array bounds
3417: too few array bounds
3418: too few arguments for <entity>
3419: too many arguments for <entity>
3421: no declaration of <entity> accepts the number of generic arguments supplied
3422: invalid delegate initializer -- must be a function
3423: invalid delegate initializer -- more than one function matches the delegate
type
3424: invalid delegate initializer -- function does not match the delegate type
3425: invalid delegate initializer -- an object is needed in addition to a function
3427: invalid delegate initializer -- object is not needed for the specified function
3428: invalid delegate initializer -- object has type <type> but type <type> is
expected
3493: <type> does not satisfy the ref class constraint of generic parameter <type>
3494: <type> does not satisfy the value class constraint of generic parameter <type>
3498: <type> does not satisfy the <type> type constraint of generic parameter <type>
3499: constraint on generic parameter <type> differs from previous declaration
(<entity>)
3503: a template argument may not reference a generic type parameter
3504: an expression list is not allowed in this subscript operation (use parentheses
around a top-level comma operator)
3506: unrecognized attribute
3510: a delegate may not be declared as a template
3511: a generic cannot be explicitly specialized
3512: a generic cannot be declared in a class template
3513: a template cannot be declared in a generic class
3514: a literal field cannot be declared "static"
3515: "long float" is a nonstandard extension -- use "double" instead
3519: <entity> is not allowed here
3520: a trivial property or event cannot be used to override <entity>
3521: expected an iterator variable name
3522: the iterator type in this "for each" statement is <type>, which is not a
pointer type or an iterator-like class type
3523: the iterator type in this "for each" statement is <type>, which is not a
pointer type or an iterator-like class type
3524: the iterator type in this "for each" statement is <type>, which is not a
pointer type or an iterator-like class type
3525: packing attribute on the parent type is ignored for this field of non-POD type
<type>
3526: <entity> not implemented because this declaration is not public and has no
named override specifier
3527: this declaration is missing the gnu_inline attribute specified in the previous
declaration <entity>
3529: previously-declared <entity> invalid as iterator of "for each" statement
3531: a function type involving a generic parameter cannot have an ellipsis parameter
3532: "virtual" is required to override the matching <entity>
3533: "virtual" is required to implement the matching <entity>
3534: an initonly data member cannot be volatile
3536: a tracking reference to non-const cannot be bound to a constant
3537: attributes ignored here because they do not apply to a declared entity
3539: invalid use of a generic class <type> with pending constraints (probably caused
by an invalid metadata file)
3540: a pending constraint clause is only allowed for generic class declarations (but
not generic class definitions)
3541: empty initializer list not allowed here
3543: a generic declaration is not allowed here
3544: interface types cannot have member generics
3545: Unicode character not Latin-1, truncated to low-order byte
3546: to be used with range-based "for" statements, type <type> must provide function
<entity>
3547: the iterator type in this range-based "for" statement is <type>, which is not a
pointer type or an iterator-like class type
3548: the iterator type in this range-based "for" statement is <type>, which is not a
pointer type or an iterator-like class type
3549: the iterator type in this range-based "for" statement is <type>, which is not a
pointer type or an iterator-like class type
3550: a range-based "for" statement cannot operate on an array of unknown size or
incomplete type <type>
3551: return types for "begin" and "end" functions used in a range-based "for"
statement must be the same ("begin" return type is <type>, "end" return type is
<type>)
3552: <entity>, required to destroy temporary that was eliminated, is inaccessible
3553: in this range-based "for" statement, no instance of <entity> matches the
argument list
3554: this range-based "for" statement requires a suitable <entity> function and none
was found
3555: this "for each" statement requires a suitable <entity> function and none was
found
3557: expected "..."
3558: <type> in __implements list is not an interface
3559: an __implements list must precede virtual function declarations
3560: <type> specified "__implements ..." in its list of bases, but is missing a
matching __implements list
3561: old for-init compatibility mode cannot be used with C++11 mode
3562: expected a ")"; pragma ignored
3564: Note: <entity> could have been called but was not considered because it is
inaccessible
3566: declaring this unary "operator*" can change the meaning of dereferencing a
handle (use static member operators to explicitly indicate applicable types)
3581: an interface class cannot contain a nonstatic data member
3582: #pragma GCC system_header cannot be used in the primary source file
3583: <entity> is too large to be inlined
3585: option to control move operations can be used only when compiling C++
3586: move operations cannot be generated when rvalue constructors are copy
constructors
3587: option to control move operations cannot be used when rvalue references are
disabled
3591: this declaration hides the nonstandard declaration of <entity> because the
underlying types are incompatible
3592: pointer comparison result is constant, because operand can never be null
3593: an object of the incomplete type <type> cannot be value-initialized
3594: a reference cannot be value-initialized
3595: expected a "(" or a "{"
3596: copy-list-initialization cannot use a constructor marked "explicit"
3597: pointer to member of type void is not allowed
3598: pointer to member of reference type is not allowed
3599: pointer to member of handle type is not allowed
3600: a brace-enclosed list is not allowed here
3602: assembly metadata refers to non-existent assembly
3603: attribute <attribute> conflicts with earlier attribute <attribute>
3604: <entity> was previously declared with a different base type
3605: "enum class" and "enum struct" cannot be used here (use plain "enum" instead)
3606: only one level of braces is allowed on an initializer for an object of type
<type>
3607: <entity> cannot be used as an enumeration type name
3608: in a lambda with an implicit return type, all return statements must return the
same type
3609: a braced-initializer cannot be used with "new auto"
3610: the definition of std::initializer_list does not contain the expected
constructor
3611: declaration hides <entity>
3612: invalid template parameter list for std::initializer_list (it should be one
ordinary type parameter with no default)
3613: a brace-enclosed list cannot be passed for an ellipsis parameter
3661: calling the default constructor for <type> does not produce a constant value
3662: the default constructor for <type> is not constexpr
3663: a constexpr variable must have a literal type or a reference type
3664: a constructor for a class with virtual bases cannot be constexpr
3665: function call must have a constant value in a constant expression
3666: function "main" may not be declared constexpr
3667: a constexpr member function is only permitted in a literal class type
3668: a class or enumeration type definition cannot appear in a constexpr function or
constructor body
3669: only GNU-style attributes are permitted here
3670: nonstandard use of "auto" to both deduce the type from an initializer and to
announce a trailing return type
3671: declaring a void parameter list with a qualified void type is nonstandard
3672: the qualifier on this local declaration is ignored
3673: this constant expression has type <type> instead of the required <entity> type
3674: an instantiation of __bases or __direct_bases requires a class type
3675: the argument of __bases and __direct_bases must be a type template parameter
3676: <entity> can only be used in template contexts
3677: constexpr constructor calls non-constexpr <entity>
3678: constructor cannot be constexpr because the initializer of <entity> is not a
constant expression
3679: non-constant initializer for constexpr constructor
3680: the generated default constructor for <type> cannot be used in an initializer
for its own data member
3681: instantiation of initializer of <entity> depends on its own value
3682: defaulted default constructor cannot be constexpr because the corresponding
implicitly declared default constructor would not be constexpr
3683: expression not folded to a constant due to excessive constexpr function call
nesting (possible infinite recursion)
3684: invalid binary number
3685: a union can have at most one field initializer -- <entity> also has an
initializer
3686: a constexpr static data member cannot be declared with an incomplete type
<type>
3687: constexpr constructor of a union must initialize one of its fields
3688: constexpr constructor fails to initialize an anonymous union (defined <entity>)
3689: a constexpr static data member declaration requires an in-class initializer
3690: maximum constexpr depth/count options can be used only when compiling C++
3691: expression not folded to a constant due to excessive constexpr function call
complexity
3692: unrestricted union options can be used only when compiling C++
3693: constexpr constructor must initialize direct base class <type>
3694: creation of an std::initializer_list object in a field initializer is unlikely
to work as expected because the underlying array will be destroyed at the end of the
full expression
3695: "this" cannot be used in a constant expression
3696: an empty initializer is not valid for this union type (which member should be
initialized is ambiguous)
3697: "constexpr" is not allowed on an explicit instantiation directive
3698: cannot determine the exception specification of the default constructor due to
a circular dependency
3699: anonymous union defined <entity>
3700: this constructor uses the initializer of <entity>, which would result in
unbounded recursion
3701: anonymous union defined <entity> cannot be default-initialized because it has a
deleted default constructor or destructor
This warning indicates the file is from a newer compiler so might contain unsupported features.
To avoid incompatibilities, either use the newer version of the compiler that generated the
configuration file, or re-generate the configuration file using your current compiler version.
See the following in the armcc User Guide:
--arm_linux_config_file=path.
--arm_linux_paths.
C4302E: configuration file has an invalid version string
This represents an error reading from or writing to an ARM Linux configuration file.
Do the following:
1. Check that the file can be read from and written to and has valid permissions.
2. Try re-generating the configuration file using --arm_linux_configure.
See the following in the armcc User Guide:
--arm_linux_configure.
C4303E: configuration file was not specified
See the description for error C4302E.
C4304E: I/O error reading configuration file <file>
See the description for error C4302E.
C4305E: I/O error writing configuration file <file>
See the description for error C4302E.
C4306E: could not parse configuration file <file>
See the description for error C4302E.
Describes the error and warning messages for the assembler, armasm.
It contains the following sections:
• 2.1 List of the armasm error and warning messages on page 2-77.
If the SETS directive is used, the argument to the directive must also be enclosed in quotes,
which might require escaping, depending on the operating system and shell. For example:
--predefine "versionstr SETS \"5A\""
A1073E: The specified output file '<filename>' must not be a source file
The object file specified on the command line has a filename extension that indicates it is a
source file. This might be because the object filename was accidentally omitted from the
command line.
A1074E: The specified depend file '<filename>' must not be a source file
The filename argument to the --depend command line option has an extension that indicates it
is a source (.s) file. This might be because the filename argument was accidentally omitted
from the command line. Check that the correct arguments are given.
A1075E: The specified errors file '<filename>' must not be a source file
The filename argument to the --errors command line option has an extension that indicates it
is a source (.s) file. This might be because the filename argument was accidentally omitted
from the command line. Check that the correct arguments are given.
A1085W: Forced user-mode LDM/STM must not be followed by use of banked R8-R14
The ARM architecture does not permit you to access banked registers in the instruction
immediately following a User registers LDM or STM. Adding a NOP immediately after the LDM or
STM is one way to avoid this.
For example:
stmib sp, {r0-r14}^ ; Return a pointer to the frame in a1.
mov r0, sp
change to:
stmib sp, {r0-r14}^ ; Return a pointer to the frame in a1.
nop
mov r0, sp
to:
AREA |1_DataArea|, CODE, READONLY
A1138E: String "<string>" too short for operation, length must be > <oplength>
A1139E: String overflow, string exceeds <max> characters
A1140E: Bad operand type
A1141E: Relocated expressions may only be added or subtracted
A1142E: Subtractive relocations not supported for <entity> format output
This can occur when subtracting symbols that are in different areas, for example:
IMPORT sym1
IMPORT sym2
DCD (sym2 - sym1)
In this case, the solution is to include the required definitions file. For example:
INCLUDE targets/eb40.inc
• When the current file requires IMPORT for some symbols, for example:
"init.s", line 4: Error: A1150E: Bad symbol
4 00000000 LDR r0, =||Image$$RAM$$ZI$$Limit||
In this case, the solution is to import the required symbol, for example:
IMPORT ||Image$$RAM$$ZI$$Limit||
The coprocessor registers CR must be labeled as a lowercase c for the code to build. The ARM
register can be r or R:
MCR p14, 3, r0, c1, c2
or
MCR p14, 3, R0, c1, c2
or
label SETS
to:
MOV PC,LR
• Use of a hardware floating point instruction without using the --fpu switch. For example:
FMXR FPEXC, r1 ;
instead of:
ADD
must be:
armasm init.s -g -PD "ROM_RAM_REMAP SETL {FALSE}"
It is necessary to specify which status register to use (CPSR or SPSR), such as, for example:
MRS r0, CPSR
A1261E: MRS cannot select fields, use APSR, CPSR or SPSR directly
This is caused by an attempt to use fields for CPSR or SPSR with an MRS instruction. For
example:
MRS r0, CPSR_c
A1327E: Non portable instruction (LDM with writeback and base in register list, final
value of base unpredictable)
In the LDM instruction, if the base register <Rn> is specified in <registers>, and base register
writeback is specified, the final value of <Rn> is UNKNOWN.
A1328E: Non portable instruction (STM with writeback and base not first in register
list, stored value of base unpredictable)
In the STM instruction, if <Rn> is specified in <registers> and base register writeback is
specified:
• If <Rn> is the lowest-numbered register specified in <register_list>, the original value of
<Rn> is stored.
• Otherwise, the stored value of <Rn> is UNKNOWN.
A1329E: Unpredictable instruction (forced user mode transfer with write-back to base)
This is caused by an instruction such as PUSH {r0}^ where the ^ indicates access to user
registers. Writeback to the base register is not available with this instruction. Instead, the base
register must be updated separately. For example:
SUB sp, sp,#4
STMID sp, {r0}^
instead of:
IF :DEF: FOO
; code
ENDIF
This code might have originally been intended to work with the legacy ARM Software
Development Toolkit (SDT). The INTERWORK area attribute is obsolete. To eliminate the error, do
the following:
• remove the ", INTERWORK" from the AREA line.
• assemble with armasm --apcs /interwork foo.s instead.
A1447W: Missing END directive at end of file, but found a label named END
This is caused by the END directive not being indented.
A1448E: Deprecated form of PSR field specifier used (use _f)
A1449E: Deprecated form of PSR field specifier used (use _c)
A1450E: Deprecated form of PSR field specifier used (use _cxsf for future
compatibility)
armasm supports the full range of MRS and MSR instructions, in the following forms:
MRS(cond) Rd, CPSR
MRS(cond) Rd, SPSR
MSR(cond) CPSR_fields, Rm
MSR(cond) SPSR_fields, Rm
MSR(cond) CPSR_fields, #immediate
MSR(cond) SPSR_fields, #immediate
To avoid the warning, in most cases you can modify your code to use _c, _f, _cf or _cxsf
instead.
See the following in the armasm User Guide:
• Conditional execution in ARM state.
• Conditional execution in Thumb state.
• General-purpose registers.
• Access to the inline barrel shifter.
See the following FAQ:
armasm: use of MRS and MSR instructions ('Deprecated form of PSR field specifier').
A1454E: FRAME STATE RESTORE directive without a corresponding FRAME STATE REMEMBER
See the following in the armasm User Guide:
• Frame directives.
• FRAME STATE REMEMBER.
• FRAME STATE RESTORE.
A1456W: INTERWORK area directive is obsolete. Continuing as if --apcs /inter selected
For example, the following code generates this warning:
AREA test, CODE, READONLY, INTERWORK
This code might have originally been intended to work with the legacy ARM Software
Development Toolkit (SDT). The INTERWORK area attribute is obsolete. To eliminate the
warning, do the following:
1. Remove the ", INTERWORK" from the AREA line.
2. Assemble with armasm --apcs /interwork foo.s instead.
See also message A1446E.
A1457E: Cannot mix INTERWORK and NOINTERWORK code areas in same file
INTERWORK and (default) NOINTERWORK code areas cannot be mixed in the same file. This code
might have originally been intended to work with the ARM Software Development Toolkit
(SDT). The INTERWORK AREA attribute is obsolete in the ARM Compiler toolchain.
For example:
AREA test1, CODE, READONLY
…
AREA test2, CODE, READONLY, INTERWORK
To prevent this warning, the data must be placed where the processor cannot execute them as
instructions. A good place for an LTORG is immediately after an unconditional branch, or after
the return instruction at the end of a subroutine.
As a last resort, you could add a branch over the LTORG to avoid the data being executed. For
example:
B unique_label
LTORG
unique_label
A1479W: Requested alignment <alignreq> is greater than area alignment <align>, which
has been increased
This is warning about an ALIGN directive that has a coarser alignment boundary than its
containing AREA. This is not permitted. To compensate, the assembler automatically increases
the alignment of the containing AREA for you. A simple test case that gives the warning is:
AREA test, CODE, ALIGN=3
ALIGN 16
mov pc, lr
END
In this example, the alignment of the AREA (ALIGN=3) is 2^3=8 byte boundary, but the mov
pc,lr instruction is on a 16-byte boundary, causing the error.
Note
The two alignment types are specified in different ways.
This warning can also occur when using AREA ... ALIGN=0 to align a code section on a byte
boundary. This is not possible. Code sections can only be aligned on:
• a four-byte boundary for ARM code, so use "ALIGN=2"
• a two-byte boundary for Thumb code, so use "ALIGN=1".
See the following in the armasm User Guide:
• ALIGN.
• AREA.
A1480W: Macro cannot have same name as a directive or instruction
A1481E: Object file format does not support this area alignment
A1482E: Shift option out of range, allowable values are from <min> to <max>
A1484W: Obsolete shift name 'ASL', use LSL instead
The ARM architecture does not have an ASL shift operation. The ARM barrel shifter only has
the following shift types:
• ROR.
• ASR.
• LSR.
• LSL.
An arithmetic (that is, signed) shift left is the same as a logical shift left, because the sign bit
always gets shifted out.
If the name ASL is used, the assembler reports this warning and converts the ASL to LSL.
See the following in the armasm User Guide:
• --unsafe.
• ASR.
A1485E: LDM/STM instruction exceeds maximum register count <max> allowed with
--split_ldm
A1486E: ADR/ADRL of a symbol in another AREA is not supported in ELF
The ADR and ADRL pseudo-instructions can only be used with labels within the same code
section. To load an out-of-area address into a register, use LDR instead.
A1487W: Obsolete instruction name 'ASL', use LSL instead
This warning is given when the ASL instruction is used in pre-UAL Thumb code, that is, when
you assemble using the --16 command-line option, or you use the CODE16 directive. See the
corresponding ARM ASL message A1484W.
A1488W: PROC/FUNC at line <lineno> in '<filename>' without matching ENDP/ENDFUNC
A1489E: <FPU> is undefined
A1490E: <CPU> is undefined
{CPU} is only defined by assembling for a processor and not an architecture.
A1491W: Internal error: Found relocation at offset <offset> with incorrect alignment
This might indicate an assembler fault. Contact your supplier.
A1492E: Immediate 0x<val> out of range for this operation. Permitted values are
0x<min> to 0x<max>
A1493E: REQUIRE must be in an AREA
A1495W: Target of branch is a data address
armasm determines the type of a symbol and detects branches to data. To suppress this warning,
specify --diag-suppress 1495.
A1496W: Absolute relocation of ROPI address with respect to symbol '<symbol>' at
offset <offset> may cause link failure
For example, when assembling the following code with --apcs /ropi, this warning is given.
This is because it generates an absolute relocation (R_ARM_ABS32) to a PI code symbol.
AREA code, CODE
codeaddr DCD codeaddr
END
However, the following instruction is invalid in pre-UAL Thumb code. The unexpected
characters are , ASR #1.
ADD r0, r0, r1, ASR #1
This warning is given because you have not explicitly set the PRESERVE8 directive, but the
assembler has set it automatically. This warning is suppressed by default. To enable it, use
--diag_warning 1547.
The warning can also occur when using ADR in Thumb-only code. The ADR Thumb pseudo-
instruction can only load addresses that are word aligned, but a label within Thumb code might
not be word aligned. Use ALIGN to ensure four-byte alignment of an address within Thumb code.
See the following in the armasm User Guide:
• ADR (PC-relative).
• ADR (register-relative).
• ALIGN.
• DCB.
• DCD and DCDU.
A1582E: Link Order area '<name>' undefined
A1583E: Group symbol '<name>' undefined
A1584E: Mode <mode> not allowed for this instruction
A1585E: Bad operand type (<typ1>) for operator <op>
A1586E: Bad operand types (<typ1>, <typ2>) for operator <op>
A1587E: Too many registers <count> in register list, maximum of <max>
A1588E: Align only available on VLD and VST instructions
A1589E: Element index must remain constant across all registers
A1590E: Mix of subscript and non-subscript elements not allowed
A1593E: Bad Alignment, must match transfer size UIMM * <dt>
A1595E: Bad Alignment, must match <st> * <dt>, or 64 when <st> is 4
A1596E: Invalid alignment <align> for dt st combination
A1597E: Register increment of 2 not allowed when dt is 8
A1598E: Bad Register list length
A1599E: Out of range subscript, must be between 0 and <max_index>
A1600E: Section type must be within range SHT_LOOS and SHT_HIUSER
A1601E: Immediate cannot be represented
A1603E: This instruction inside IT block has UNPREDICTABLE results
A1604W: Thumb Branch to destination without alignment to <max> bytes
A1606E: Symbol attribute <attr1> cannot be used with attribute <attr2>
A1607E: Thumb-2 wide branch instruction used, but offset could fit in Thumb-1 narrow
branch instruction
A1608W: MOV pc,<rn> instruction used, but BX <rn> is preferred
A1609W: MOV <rd>,pc instruction does not set bit zero, so does not create a return
address
This warning is caused when the current value of the PC is copied into a register while
executing in Thumb state. An attempt to create a return address in this fashion fails because
bit[0] is not set. Attempting to BX to this instruction causes a state change (to ARM).
To create a return address, you can use:
MOV r0, pc
ADDS r0, #1
A1745W: This register combination is DEPRECATED and may not work in future
architecture revisions
This warning is generated when all of the following conditions are satisfied:
• You are using a deprecated register combination, for example:
PUSH {r0, pc}
• You are assembling for a target architecture that supports 32-bit Thumb instructions, in other
words ARMv6T2 or later.
• You are assembling to ARM code.
Note
• When assembling to Thumb, rather than ARM code, and the target architecture is ARMv6T2
or later, the assembler generates error A1477E instead.
• When assembling for an architecture or processor that does not support 32-bit Thumb
instructions, in other words ARM® architectures before ARMv6T2, by default no diagnostic
is emitted.
A1772E: Destination type must be signed or unsigned integer, and source type must be
32-bit or 64-bit floating-point
A1773E: Floating-point conversion only possible between 32-bit single-precision and
64-bit double-precision types
A1774E: Fixed-point conversion only possible for 16-bit or 32-bit signed or unsigned
types
A1775E: Conversion between these types is not possible
A1776E: This operation is not available for 32-bit single-precision floating point
types
A1777E: <n> is out of range for symbol type; value must be between <min> and <max>
A1778E: <n> is out of range for symbol binding; value must be between <min> and <max>
A1779E: DCDO cannot be used on READONLY symbol '<key>'
A1780E: Unknown ATTR directive
A1781E: Tag #<id> cannot be set by using ATTR
A1782E: Tag #<id> should be set with ATTR <cmd>
A1783E: Attribute scope must be a label or section name
A1784W: Reference to weak definition '<sym>' not relocated
A1785E: Macro '<macuse>' not found, but '<macdef>' exists
A1786W: This instruction using SP is deprecated and may not work in future
architecture revisions
This warning is generated when all of the following conditions are satisfied:
• You explicitly use the SP in a deprecated way, for example:
ADD sp, r0, #100
• You are assembling for a target architecture that supports 32-bit Thumb instructions, in other
words ARMv6T2 or later.
• You are assembling to ARM code.
ARM deprecates the explicit use of the SP in ARM instructions in any way that is not possible
in the corresponding Thumb instruction. Such deprecated register uses are still possible in ARM
instructions for backwards compatibility and you can suppress this warning by using the
assembler’s command line option --diag_suppress=1786. However, ARM recommends you
modify your code, because it might not work in future architecture revisions.
You can replace the deprecated use of the SP shown in the example with a sequence like:
ADD r1, r0, #100
MOV sp, r1
Note
• When assembling to Thumb, rather than ARM code, and the target architecture is ARMv6T2
or later, the assembler generates error A1477E instead.
• When assembling for an architecture or processor that does not support 32-bit Thumb
instructions, in other words ARM architectures before ARMv6T2, by default no diagnostic
is emitted.
A1788W: Explicit use of PC in this instruction is deprecated and may not work in
future architecture revisions
This warning is generated when all of the following conditions are satisfied:
• You explicitly use the PC in a deprecated way, for example:
CMP pc, #1
• You are assembling for a target architecture that supports 32-bit Thumb instructions, in other
words ARMv6T2 or later.
• You are assembling to ARM code.
ARM deprecates the explicit use of the SP in ARM instructions in any way that is not possible
in the corresponding Thumb instruction. Such deprecated register uses are still possible in ARM
instructions for backwards compatibility and you can suppress this warning by using the
assembler’s command line option --diag_suppress=1786. However, ARM recommends you
modify your code, because it might not work in future architecture revisions.
Note
• When assembling to Thumb, rather than ARM code, and the target architecture is ARMv6T2
or later, the assembler generates error A1477E instead.
• When assembling for an architecture or processor that does not support 32-bit Thumb
instructions, in other words ARM architectures before ARMv6T2, by default no diagnostic
is emitted.
A1789W: Explicit use of PC in this instruction is deprecated and and may not work in
future architecture revisions, except as destination register
A1790W: Writeback ignored in Thumb LDM loading the base register
This is caused by incorrectly adding an exclamation mark to indicate base register writeback.
For example:
LDM r0!, {r0-r4}
is not a legal instruction because r0 is the base register and is also in the destination register list.
In this case, the assembler ignores the writeback and generates:
LDM r0, {r0-r4}
A1809W: Instruction aligns PC before using it; section ought to be at least 4 byte
aligned
This warning is generated when all the following conditions apply:
• You are using a PC-relative offset in a Thumb instruction that requires the PC to be word-
aligned.
• The code section containing this instruction has less than 4-byte alignment.
• The instruction is not relocated at link time (because of a relocation emitted by the
assembler).
If these conditions are all met, and the code section containing this instruction is not placed at a
4-byte aligned address when linking, the instruction might operate on or with the wrong address
at runtime. This is because the instruction aligns the PC to a 4-byte address before using it.
The following example shows an LDR instruction in Thumb that is diagnosed by this warning
because the section has an alignment of 2 bytes:
AREA ||.text||, CODE, READONLY, ALIGN=1
THUMB
LDR r0, [pc, #8] ; gives warning A1809W
A1810E: Base register writeback value unclear; use '[rn,#n]!' or '[rn],#n' syntax
A1811E: Size of fill value must be 1, 2 or 4 bytes and a factor of fill size
A1812W: Instruction cannot be assembled in the opposite instruction set
A1813W: 32-bit instruction used where 16-bit could have been used
A1814E: No output file
A1815E: SHT_ARM_EXIDX sections require a link order dependency to be set
A1816E: Unknown opcode '<name>' in CODE16, but exists in THUMB
A1817W: ATTR tag #<id> setting ignored in <scope>
A1818W: ATTR COMPAT flag <flag> and vendor '<vendor>' setting ignored in <scope>
A1819W: ATTR compatible with tag #<id> setting ignored in <scope>
A1820E: Register and processor mode not valid for instruction
A1821E: Expected constant or register expression
A1822E: Expected list of 32-bit extension registers
A1823E: Expected list of 64-bit extension registers
A1824E: Expected core register or 32-bit, 64-bit or 128-bit extension register
A1825E: Expected constant or 32-bit extension register
A1826E: Expected constant or 64-bit extension register
A1827E: Expected constant or 128-bit extension register
A1828E: Expected core register or 32-bit extension register
A1829E: Expected core register or 64-bit extension register
A1830E: Expected core register or 128-bit extension register
A1831E: Expected constant, floating-point constant, core register or 64-bit extension
register
A1832E: Expected floating-point constant, core register or 32-bit extension register
A1833E: Expected constant or '{option}', where option is a constant from 0 to 255
A1834E: Expected register or address expression
A1835E: Too few data types specified on instruction
A1836E: Expected '<dt>' data type for destination
A1837E: Expected '<dt>' data type for first source
A1838E: Unexpected characters when expecting '<word1>' or '<word2>'
A1839E: Destination register must be scalar
A1840E: First source register must be scalar
A1841E: Alignment specified on base register not valid for instruction
A1842E: Syntax not allowed for a pseudo-instruction
A1843E: Literal load not supported for instruction
A1844E: Literal type not supported
A1845E: Register type not available in current instruction set
A1846E: Invalid field specifiers for CPSR or SPSR: must be followed by at least one
of c, x, s or f
A1847E: Expression requiring more than one relocation not allowed
This can occur during the assembly of ARM instructions when trying to access data in another
area. For example, using:
LDR r0, [pc, #label - . - 8]
or its equivalent:
LDR r0, [pc, #label-{PC}-8]
A1877E: Specified register for <field> not allowed in current instruction set
A1878E: Offset must be <reqalign>-byte aligned when used with this operation
A1879E: Specified addressing mode not available
A1880E: Data transfer size not available
A1881E: <mode> load/store mode is not permitted
A1882E: Destination and first source register must be same
A1883E: Destination and second source register must be same
A1884E: Specified AIF bits not available on target CPU
A1885E: Cannot change processor mode in current instruction set
A1886E: Invalid operand size for add with carry-in: must be 16 or 32
A1887E: Specified source data type not allowed; must be one of: <str>
A1888E: Specified destination data type not allowed; must be one of: <str>
A1889E: Specified register type not available on target architecture
A1890E: Specified shift results in UNPREDICTABLE behaviour
A1891E: With this register combination, writeback results in UNPREDICTABLE behaviour
A1892W: Writeback with this register combination is deprecated and may not work in
future architecture revisions
A1893E: The specified flags result in UNPREDICTABLE behaviour
A1894E: The specified immediate results in UNPREDICTABLE behaviour
A1895E: The specified condition results in UNPREDICTABLE behaviour
A1896E: Specified alignment not supported on this instruction
A1897E: Bitfield width out of range. Permitted values are 1 to <max>
A1898E: Target cannot be relocated. No suitable relocation exists for this
instruction
A1899E: Specified operator is only allowed on the following instructions: <instrs>
A1900W: Deprecated system instruction name
A1901E: Specified system instruction not supported on target architecture
A1902E: Specified special register not supported on target architecture
A1903E: Line not seen in first pass; cannot be assembled
This occurs if an instruction or directive does not appear in pass 1 but appears in pass 2 of the
assembler.
The following example shows when a line is not seen in pass 1:
AREA x,CODE
[ :DEF: foo
num EQU 42 ; Assembler does not see this line during pass 1 because
; foo is not defined at this point during pass 1
]
foo DCD num
END
A1911E: Immediate 0x<val> out of range for this operation. Immediate value must be 0
A1912E: In this instruction, register <field> must not be PC when flag-setting is
specified
A1913E: Specified operand type not allowed in this position
A1914E: Expected expression
A1915W: Relocation is not recommended on this instruction or directive
A1916E: Unknown built-in variable '<name>'
A1917E: Expected vector register expression
A1921E: Expected 8-bit byte register expression
A1922E: Expected 16-bit halfword register expression
A1923E: Expected list of vector registers
A1925E: Coprocessor number must be 14 or 15 on this architecture
A1927E: Expected core register, 64-bit extension register or vector register
A1931W: This instruction inside IT block is deprecated
A1932E: Register type not allowed on this architecture
A1933E: Option '<opt>' not supported on target architecture
A1934E: Shift by <shift> not allowed. Permitted values are <allowed>
A1936E: Literal pool too distant, use LTORG to assemble it within <distance>
A1937E: Conversions to fixed point only support rounding mode Z
A1938E: Coprocessor number must be 14 on this architecture
A1939W: This mnemonic is deprecated
A1940E: Execute only is not compatible with <option>
A1941E: Unable to align to a non-multiple of <nopsize> using NOP instructions
A1942E: Data declarations are not permitted in execute-only sections
A1943E: INCBIN cannot be used in execute-only sections
A1944E: Literal pool entries cannot be generated in execute-only sections
A1992E: MOVT of external symbol must follow corresponding MOVW instruction
A1993E: This operator requires a relocation that is not supported in <objfmt>
A1994E: This directive is not supported in <objfmt>
A1995E: Weak definitions are not supported in <objfmt>
A1996E: TYPE must only be used after WEAK on IMPORT
A1997E: Expected alias for weak extern symbol
A1998E: Comdat Associated area must have Comdat Associative selection type
A1999E: Comdat Associated area cannot be another Comdat Associated area
Describes the error and warning messages for the linker, armlink.
It contains the following sections:
• 3.1 Suppressing armlink error and warning messages on page 3-106.
• 3.2 List of the armlink error and warning messages on page 3-107.
Some errors such as L6220E, L6238E and L6784E can be downgraded to a warning by using:
--diag_warning
Either specify the library path with --libpath or set the ARMCC5LIB environment variable to
install_directory\lib.
Note
In ARM Compiler v5.0 and later, armlink does not require the ARMCC5LIB environment
variable to be set.
Another less common cause is a corrupt library, or possibly a library in an unsupported format.
L6005U: Extra characters on end of member list for <library>.
L6006U: Overalignment value not specified with OVERALIGN attribute for execution
region <regionname>.
See the following in the armlink User Guide:
• Syntax of an input section description.
• Overalignment of execution regions and input sections.
L6007U: Could not recognize the format of file <filename>.
The linker can recognize object files in ELF format and library files in AR format. The specified
file is either corrupt, or is in a file format that the linker cannot recognize.
L6008U: Could not recognize the format of member <mem> from <lib>.
The linker can recognize library member objects in the ELF file format. The specified library
member is either corrupt, or is in a file format that the linker cannot recognize.
L6009U: File <filename> : Endianness mismatch.
The endianness of the specified file or object did not match the endianness of the other input
files. The linker can handle input of either big endian or little endian objects in a single link step,
but not a mixed input of some big and some little endian objects.
L6010U: Could not reopen stderr to file <filename>: <reason>
An file I/O error occurred while reading, opening, or writing to the specified file.
L6011U: Invalid integer constant : <number>.
Specifying an illegal integer constant causes this. An integer can be entered in hexadecimal
format by prefixing &, 0x, or 0X.
L6015U: Could not find any input files to link.
The linker must be provided with at least one object file to link.
For example, if you try to link with:
armlink lib.a -o foo.axf
This means that there are two conflicting definitions of __stdout present in retarget.o and
stdio.o. The one in retarget.o is your own definition. The one in stdio.o is the default
implementation, which was probably linked-in inadvertently.
stdio.o contains a number of symbol definitions and implementations of file functions like
fopen, fclose, and fflush.
To identify why stdio.o is being linked-in, you must use the --verbose link option switch. For
example:
armlink [... your normal options...] --verbose --list err.txt
Then study err.txt to see exactly what the linker is linking in, from where, and why.
You might have to either:
• eliminate the calls like fopen, fclose, and fflush
• re-implement the _sys_xxxx family of functions.
See the following in the ARM C and C++ Libraries and Floating-Point Support User Guide:
Tailoring input/output functions in the C and C++ libraries.
You can use InRoot$$Sections to include all required sections in a root region:
ROM_LOAD 0x0000 0x4000
{
ROM_EXEC 0x0000 0x4000 ; root region
{
vectors.o (Vect, +FIRST) ; Vector table
* (InRoot$$Sections) ; All library sections
; that must be in a root region
; for example, __main.o, __scatter*.o,
; dc*.o and * Region$$Table
}
RAM 0x10000 0x8000
{
* (+RO, +RW, +ZI) ; all other sections
}
}
Note
Using assembler files with more than one AREA might give other problems elsewhere, so this is
best avoided.
This might produce the following error if exception handling index tables are in both file1.o
and file2.o, because the linker cannot place them in separate regions:
Error: L6216E: Cannot use base/limit symbols for non-contiguous section .ARM.exidx
Also, the .init_array sections must be placed contiguously within the same region for their
base and limit symbols to be accessible.
The correct code is:
LOAD_ROM 0x00000000
{
ER1 0x00000000
{
file1.o (+RO) ; from a C++ source
* (.ARM.exidx) ; Section .ARM.exidx must be placed
; explicitly, otherwise it is shared between
; two regions and the linker is unable to
; decide where to place it.
*(.init_array) ; Section .init_array must be placed
; explicitly, otherwise it is shared between
; two regions and the linker is unable to
; decide where to place it.
* (+RO)
}
ER2 0x01000000
{
file2.o (+RO) ; from a C++ source
}
ER3 +0
{
* (+RW, +ZI)
}
}
In this example, the base and limit symbols are contained in .init_array in a single region.
See the following in the ARM C and C++ Libraries and Floating-Point Support User Guide:
C++ initialization, construction and destruction.
L6217E: Relocation #<rel_class>:<rel_number> in <objname>(<secname>) with respect to
<symbol>. R_ARM_SBREL32 relocation to imported symbol
The helper functions are automatically generated into the object file by the compiler.
Note
An undefined reference error can, however, still be generated if linking objects from legacy
projects where the helper functions are in the h_xxx libraries (h indicates that these are
compiler helper libraries, rather than standard C library code).
Re-compile the object or ensure that these libraries can be found by the linker.
• When attempting to refer to a function or entity in C from a function or entity in C++. This is
caused by C++ name mangling, and can be avoided by marking C functions extern "C".
• Undefined symbol thunk{v:0,-44} to Foo_i::~Foo_i() (referred from Bar_i.o)
The linker is reporting that your application does not include a main() function.
See the following in the Migration and Compatibility Guide:
C and C++ library changes between RVCT v2.2 and RVCT v3.0.
L6219E: <type> section <object1>(<section1>) attributes {<attributes>} incompatible
with neighboring section <object2>(<section2>).
This error occurs when the default ordering rules used by the linker (RO followed by RW
followed by ZI) are violated. This typically happens when one uses +FIRST or +LAST, for
example in a scatter file, attempting to force RW before RO.
L6220E: <type> region <regionname> size (<size> bytes) exceeds limit (<limit> bytes).
Example:
Execution region ROM_EXEC size (4208184 bytes) exceeds limit (4194304 bytes).
This can occur where a region has been given an (optional) maximum length in the scatter file,
but the size of the code and data being placed in that region has exceeded the limit. This error is
suppressible with --diag_suppress 6220.
For example, this might occur when using .ANYnum selectors with the ALIGN directive in a
scatter file to force the linker to insert padding. You might be able to fix this using the
--any_contingency option.
Built with:
armasm test.s
armlink -o test.axf --scatter scatter.txt test.o
Generates:
Warning: L6221E: Execution region ER2 with Execution range
[0x00008004,0x00008010) overlaps with Execution region ER3 with Load range
[0x00008004,0x00008008).
The linker might emit warning message L6221E when an execution region base address overlaps
with the load address of another region. This could be due to an incorrect scatter file. The
memory map of the image has a load view and an execution view, described by the scatter-
loading file. A non-ZI section must have a unique load address and in most cases must have a
unique execution address. From RVCT v3.1 onwards, the linker no longer assigns space to ZI
execution regions. Therefore this warning might be because a load region LR2 with a relative
base address immediately follows a ZI execution region in a load region LR1.
Because the overlapping part might not have real code or data inside, the warning might be
harmless.
From RVCT v4.0 build 821 onwards, you can use the following linker options to find out the
addresses of each region, and any regions that overlap with a load region:
--load_addr_map_info --map --list=map.txt
• Ignore the warning, only if after analysis it is possible to determine that the execution region
is not going to corrupt the load region that has not yet been copied to its execution region
address. Also, debug the application to confirm that it initializes and executes correctly.
• Adjust the base addresses of the execution regions.
• Use the FIXED scatter-loading attribute to make the load regions and execution regions have
the same base addresses.
See the following in the armlink User Guide:
• Scatter files containing relative base address load regions and a ZI execution region.
• Execution region attributes.
• Root execution regions and the FIXED attribute.
L6222E: Partial object cannot have multiple ENTRY sections, <e_oname>(<e_sname>) and
<oname>(<sname>).
Where objects are being linked together into a partially-linked object, only one of the sections in
the objects can have an entry point.
Note
It is not possible in this case to use the linker option --entry to select one of the entry points.
+FIRST means place this (single) section first. Selectors that can match multiple sections (for
example, +RO or +ENTRY) are not permitted to be used with +FIRST (or +LAST). If used together,
the error message is generated.
L6235E: More than one section matches selector - cannot all be FIRST/LAST.
See the following in the armlink User Guide:
• Section placement with the FIRST and LAST attributes.
• Syntax of an input section description.
L6236E: No section matches selector - no section to be FIRST/LAST.
The scatter file specifies a section to be +FIRST or +LAST, but that section does not exist, or has
been removed by the linker because it believes it to be unused. Use the linker option --info
unused to reveal which objects are removed from your project. Example:
ROM_LOAD 0x00000000 0x4000
{
ROM_EXEC 0x00000000
{
vectors.o (Vect, +First) << error here
* (+RO)
}
RAM_EXEC 0x40000000
{
* (+RW, +ZI)
}
}
Then link with --entry Vector_table to define the real start of your code.
See the following in the armlink User Guide:
• Section placement with the FIRST and LAST attributes.
• --entry=location.
• --info=topic[,topic,...].
• --keep=section_id.
• --remove, --no_remove.
• Syntax of an input section description.
See the following in the armasm User Guide:
ENTRY.
L6237E: <objname>(<secname>) contains relocation(s) to unaligned data.
For example:
Error: L6238E: foo.o(.text) contains invalid call from '~PRES8' function to 'REQ8'
function foobar
This means that there is a function in the object foo.o (in the section named .text) that does
not preserve eight-byte stack alignment, but which is trying to call function foobar that requires
eight-byte stack alignment.
A similar warning that might be encountered is:
Warning: L6306W: '~PRES8' section foo.o(.text) should not use the address of 'REQ8'
function foobar
to
STMFD sp!, {r0-r3, r12, lr} ; push even number of registers
The assembler automatically marks the object with the PRES8 attribute if all instructions
preserve eight-byte stack alignment, so it is no longer necessary to add the PRESERVE8
directive to the top of each assembler file.
• If you have any legacy objects/libraries that cannot be rebuilt, either because you do not
have the source code, or because the old objects must not be rebuilt (for example, for
qualification/certification reasons), then you must inspect the legacy objects to check
whether they preserve eight-byte alignment or not.
Use fromelf -c to disassemble the object code. C/C++ code compiled with ADS 1.1 or
later normally preserves eight-byte alignment, but assembled code does not.
If your objects do indeed preserve eight-byte alignment, then the linker error L6238E can be
suppressed with the use of --diag_suppress 6238 on the linker command line.
By using this, you are effectively guaranteeing that these objects are PRES8.
The linker warning L6306W is suppressible with --diag_suppress 6306.
See the following FAQ:
8 Byte Stack Alignment.
L6239E: Cannot call non-interworking <t2> symbol '<sym>' in <obj2> from <t1> code in
<obj1>(<sec1>)
Example:
Cannot call non-interworking ARM symbol 'ArmFunc' in object foo.o from THUMB code in
bar.o(.text)
This problem can be caused by foo.c not being compiled with the option --apcs /interwork,
to enable ARM code to call Thumb code (and Thumb to ARM) by linker-generated
interworking veneers.
L6241E: <objname>(<secname>) cannot use the address of '<attr1>' function <sym> as
the image contains '<attr2>' functions.
When linking with --strict, the linker reports conditions that might fail as errors, for example:
Error: L6241E: foo.o(.text) cannot use the address of '~IW' function main as the
image contains 'IW' functions.
L6242E: Cannot link object <objname> as its attributes are incompatible with the
image attributes.
Each object file generated by the compilation tools includes a set of attributes that indicates the
options that it was built with. The linker checks the attributes of each object file it processes. If
it finds attributes that are incompatible with those of object files it has loaded previously, it
generates this error.
There are three common reasons for this error, each of which produces a different message:
• Error: L6242E: Cannot link object foo.o as its attributes are incompatible with
the image attributes.
require four-byte alignment of eight-byte datatypes clashes with require eight-
byte alignment of eight-byte data types.
This can occur when you try to link objects built using RVCT 2.0 or later with objects built
using ADS or RVCT 1.2. In ADS and RVCT 1.2, double and long long data types were 4-
byte aligned (unless you used the -Oldrd compiler option or the __align keyword). In
RVCT 2.0, the ABI changed, so that double and long long data types are 8-byte aligned.
This change means that ADS and RVCT 1.2 objects and libraries using double or long
long data types are not directly compatible with objects and libraries built using RVCT 2.0
or later, and so the linker reports an attribute clash.
To use RVCT 2.x or 3.0 C objects with legacy ADS C objects, compile the RVCT 2.x or 3.0
C code with the --apcs /adsabi command line option. This option was deprecated in
RVCT 2.2 and removed from RVCT 3.1.
• Error: L6242E: Cannot link object foo.o as its attributes are incompatible with
the image attributes.
... pure-endian double clashes with mixed-endian double.
This can occur when you are linking objects built using the ARM Compiler toolchain, RVCT
or ADS with legacy SDT objects or objects built using either of the compiler options --fpu
softfpa or --fpu fpa. SDT used a non-standard format for little-endian double and big-
endian long long. However ADS and RVCT use industry-standard double and long long
types, except for when the --fpu softfpa or --fpu fpa options are used. (These options
are only supported in RVCT 2.1 and earlier). If you attempt to link object files that use the
different formats for little-endian double and big-endian long long then the linker reports
this error.
ARM recommends you rebuild your entire project using RVCT or the ARM Compiler
toolchain. If you do not have the source code for an object or library, then try recompiling
your code with --fpu softfpa.
• Error: L6242E: Cannot link object foo.o as its attributes are incompatible with
the image attributes.
... FPA clashes with VFP.
This error typically occurs when you attempt to link objects built with different --fpu
options. ARM recommends you rebuild your entire project using the same --fpu options.
See the following FAQ:
Are legacy objects and libraries compatible with my project?.
L6243E: Selector only matches removed unused sections - no section to be FIRST/LAST.
All sections matching this selector have been removed from the image because they were
unused. For more information, use --info unused.
L6244E: <type> region <regionname> address (<addr>) not aligned on a <align> byte
boundary.
L6245E: Failed to create requested ZI section '<name>'.
This is because the compiler generates a global pointer str that must be initialized to the
address of the string in the .conststring section. However, absolute addresses cannot be used
in a PI system, so the link step fails.
To resolve this, you must re-write the code to avoid the explicit pointer. You can do this using
either of the following methods:
• Use a global array instead of a global pointer, for example:
#include <stdio.h>
const char str[] = "test";
int main(void)
{
printf ("%s",str);
}
• Use a local pointer instead of a global pointer, for example:
#include <stdio.h>
int main(void)
{
char *str = "test";
printf ("%s",str);
}
Note
If you are using an array of pointers, such as:
char * list[] = {"zero", "one", "two"};
the linker reports a separate error for each element in the array. In this case, ARM recommends
you declare a two dimensional array for the list, with the first dimension as the number of
elements in the array, and the second dimension as the maximum size of an element in the array,
for example:
char list[3][5] = {"zero", "one", "two"};
This behavior is specified in the Exception Handling ABI for the ARM Architecture
(EHABI). The EHABI states that the R_ARM_PREL31 relocation, which .ARM.exidx uses,
does not use the highest bit (bit 31) for calculating the relocation.
The most likely cause of this is that C++ code that must access the .ARM.exidx sections, has
been split and placed into separate execution regions, outside of the valid range
(-0x40000000 to 0x3fffffff).
To resolve this error, if you have memory between the separated execution regions, place
the .ARM.exidx section there with the selector *(.ARM.exidx). For example:
LOAD_ROM 0x00000000
{
ER1 0x00000000 ; The distance from ER2 to ER1 is out of
{ ; range.
file1.o (+RO) ; From a C++ source.
* (+RO)
}
ERx 0x30000000
{
*(.ARM.exidx) ; ARM.exidx to ER1 and ER2 both in range.
}
ER2 0x60000000
{
file2.o (+RO) ; From a C++ source.
}
ER3 +0
{
* (+RW, +ZI)
}
}
Otherwise, try placing the code into an execution region close enough to the tables (within
the range of -0x40000000 to 0x3fffffff).
In other cases, make sure you have the latest patch installed from Downloads.
For more information, see the following:
What does "Error: L6286E: Value out of range for relocation" mean?
Exception Handling ABI for the ARM Architecture.
L6287E: Illegal alignment constraint (<align>) specified for <objname>(<secname>).
An illegal alignment was specified for an ELF object.
L6291E: Cannot assign Fixed Execution Region <ername> Load Address:<addr>. Load
Address must be greater than or equal to next available Load Address:<load_addr>.
See the following in the armlink User Guide:
Execution region attributes.
L6292E: Ignoring unknown attribute '<attr>' specified for region <regname>.
This error message is specific to execution regions with the FIXED attribute. FIXED means make
the load address the same as the execution address. The linker can only do this if the execution
address is greater than or equal to the next available load address within the load region.
See the following in the armlink User Guide:
• Root execution regions and the FIXED attribute.
• Execution region attributes.
L6294E: <type> region <regionname> spans beyond 32 bit address space (base <base>,
size <size> bytes).
This error message relates to a problem with the scatter file.
L6295E: Relocation #<rel_class>:<rel_number> in <objname>(<secname>) with respect to
<symname> SBREL relocation requires image to be RWPI
L6296E: Definition of special symbol <sym1> is illegal as symbol <sym2> is absolute.
See L6188E.
L6300W: Common section <object1>(<section1>) is larger than its definition
<object2>(<section2>).
This might indicate a compiler fault. Contact your supplier.
L6301W: Could not find file <filename>: <reason>
The specified file was not found in the default directories.
L6302W: Ignoring multiple SHLNAME entry.
There can be only one SHLNAME entry in an edit file. Only the first such entry is accepted by the
linker. All subsequent SHLNAME entries are ignored.
or
--entry <label>
This warning can also appear when linking objects generated by GCC. GCC uses linker
relocations for references internal to each object. The targets of these relocations might not have
appropriate mapping symbols that permit the linker to determine whether the target is code or
data, so a warning is generated. By contrast, armcc resolves all such references at compile-time.
on the linker command-line in your makefile, but this section might not be present when
building with no C++, in which case this warning is reported:
Ignoring --keep command. Cannot find section *(.init_array)
You can often ignore this warning, or suppress it with --diag_suppress 6319.
L6320W: Ignoring <cmd> command. Cannot find argument '<argname>'.
L6323W: Relocation #<rel_class>:<rel_number> in <objname>(<secname>) with respect to
<sym>. Multiple variants exist. Using the <type> variant to resolve ambiguity
L6324W: Ignoring <attr> attribute specified for Load region <regname>.
This attribute is applicable to execution regions only. If specified for a Load region, the linker
ignores it.
L6325W: Ignoring <attr> attribute for region <regname> which uses the +offset form of
base address.
This attribute is not applicable to regions using the +offset form of base address. If specified
for a region, which uses the +offset form, the linker ignores it.
A region that uses the +offset form of base address inherits the PI, RELOC, or OVERLAY
attributes from either:
• the previous region in the description
• the parent load region if it is the first execution region in the load region.
See the following in the armlink User Guide:
• Inheritance rules for load region address attributes.
• Inheritance rules for execution region address attributes.
• Inheritance rules for the RELOC address attribute.
L6326W: Ignoring ZEROPAD attribute for non-root execution region <ername>.
ZEROPAD only applies to root execution regions. A root region is a region whose execution
address is the same as its load address, and so does not require moving or copying at run-time.
See the following in the armlink User Guide:
Execution region attributes.
L6329W: Pattern <module>(<section>) only matches removed unused sections.
All sections matching this pattern have been removed from the image because they were
unused. For more information, use --info unused.
See the following in the armlink User Guide:
• Elimination of unused sections.
• --info=topic[,topic,...].
L6330W: Undefined symbol <symbol> (referred from <objname>). Unused section has been
removed.
This means that an unused section has had its base and limit symbols referenced. For more
information, use --info unused.
For example, when using a scatter file to place code and data with RVCT 2.1 or later, the linker
reports this error if the scatter file includes the linker-generated table ZISection$$Table. In
RVCT 2.1, a new region tables format was introduced which no longer contains ZISection$
$Table.
L6384E: No Load Execution Region of name <region> seen yet at line <line>.
This might be because you have used the current base address in a limit calculation in a scatter
file. For example:
ER_foo 0 ImageBase(ER_foo)
L6407W: Sections of aggregate size 0x<size> bytes could not fit into .ANY
selector(s).
This warning identifies the total amount of image data that cannot be placed in any .ANY
selectors.
For example, .ANY(+ZI) is placed in an execution region that is too small for the amount of ZI
data:
ROM_LOAD 0x8000
{
ROM_EXEC 0x8000
{
.ANY(+RO,+RW)
}
RAM +0 0x{...} <<< region max length is too small
{
.ANY(+ZI)
}
}
L6426E: Within the same collection, section <secname> cannot have its name
duplicated.
L6427E: Cannot rename <sym> to <newname> as it has already been renamed to <name>).
L6429U: Attempt to set maximum number of open files to <val> failed with error code
<error>.
An attempt to increase the number of file handles armlink can keep open at any one time has
failed.
L6431W: Ignoring incompatible enum size attribute on Symbol <symbol> defined in
<object>(<section>).
L6432W: Ignoring incompatible enum size attribute on Object <object>(<section>).
L6433W: Ignoring incompatible enum size attribute on object <object>.
L6434W: Ignoring incompatible wchar_t size attribute on Symbol <symbol> defined in
<object>(<section>).
L6435W: Ignoring incompatible wchar_t size attribute on Section <object>(<section>).
L6436W: Ignoring incompatible wchar_t size attribute on object <object>.
L6437W: Relocation #<rel_class>:<idx> in <objname>(<secname>) with respect to
<armsym>. Branch relocation to untyped symol in object <armobjname>, target state
unknown.
L6438E: __AT section <objname>(<secname>) address <address> must be at least 4 byte
aligned.
L6439W: Multiply defined Global Symbol <sym> defined in <objname>(<secname>) rejected
in favour of Symbol defined in <selobj>(<selsec>).
L6440E: Unexpected failure in link-time code generation
L6441U: System call to get maximum number of open files failed <error>.
L6442U: Linker requires a minimum of <min> open files, current system limit is <max>
files.
L6443W: Data Compression for region <region> turned off. Region contains reference to
symbol <symname> which depends on a compressed address.
The linker requires the contents of a region to be fixed before it can be compressed and cannot
modify it after it has been compressed. Therefore a compressible region cannot refer to a
memory location that depends on the compression process.
L6444I: symbol visibility : <symname> set to <visibility>.
L6445I: symbol visibility : <symname> merged to <set_vis> from existing <old_vis> and
new <new_vis>.
L6447E: SHT_PREINIT_ARRAY sections are not permitted in shared objects.
L6448W: While processing <filename>: <message>
L6449E: While processing <filename>: <message>
L6450U: Cannot find library <libname>.
L6451E: <object> built permitting Thumb is forbidden in an ARM-only link.
L6452E: <object>(<section>) built permitting Thumb is forbidden in an ARM-only link.
L6453E: <symbol> defined in <object>(<section>) built permitting Thumb is forbidden
in an ARM-only link.
L6454E: <symbol> defined in <object>(ABSOLUTE) built permitting Thumb is forbidden in
an ARM-only link.
L6455E: Symbol <symbolname> has deprecated ARM/Thumb Synonym definitions (by
<object1> and <object2>).
L6459U: Could not create temporary file.
L6462E: Reference to <sym> from a shared library only matches a definition with
Hidden or Protected Visibility in Object <obj>.
L6463U: Input Objects contain <archtype> instructions but could not find valid target
for <archtype> architecture based on object attributes. Suggest using --cpu option to
select a specific cpu.
See the following in the armlink User Guide:
--cpu=name.
L6640E: PDTTable section not least static data address, least static data section is
<secname>
Systems that implement shared libraries with RWPI use a process data table (PDT). It is created
at static link time by the linker and must be placed first in the data area of the image.
This message indicates that the scatter file does not permit placing the PDT first in the data area
of the image.
To avoid the message, adjust your scatter file so that the PDT is placed correctly. This message
can also be triggered if you accidentally build object files with --apcs=/rwpi.
L6642W: Unused virtual function elimination might not work correctly, because
<obj_name> has not been compiled with --vfe
L6643E: The virtual function elimination information in section <sectionname> refers
to the wrong section.
This message might indicate a compiler fault. Contact your supplier.
L6644E: Unexpectedly reached the end of the buffer when reading the virtual function
elimination information in section <oepname>(<sectionname>).
This message might indicate a compiler fault. Contact your supplier.
L6645E: The virtual function elimination information in section
<oepname>(<sectionname>) is incorrect: there should be a relocation at offset
<offset>.
This message might indicate a compiler fault. Contact your supplier.
L6646W: The virtual function elimination information in section
<oepname>(<sectionname>) contains garbage from offset <offset> onwards.
This message might indicate a compiler fault. Contact your supplier.
L6647E: The virtual function elimination information for
<vcall_objectname>(<vcall_sectionname>) incorrectly indicates that section
<curr_sectionname>(object <curr_objectname>), offset <offset> is a relocation (to a
virtual function or RTTI), but there is no relocation at that offset.
This message might indicate a compiler fault. Contact your supplier.
L6649E: EMPTY region <regname> must have a maximum size.
See the following in the armlink User Guide:
Execution region attributes.
L6650E: Object <objname> Group section <sectionidx> contains invalid symbol index
<symidx>.
L6651E: Section <secname> from object <objname> has SHF_GROUP flag but is not member
of any group.
L6652E: Cannot reverse Byte Order of Data Sections, input objects are <inputendian>
requested data byte order is <dataendian>.
L6654E: Rejected Local symbol <symname> referred to from a non group member
<objname>(<nongrpname>)
This message might indicate a compiler fault. Contact your supplier.
L6656E: Internal error: the vfe section list contains a non-vfe section called
<oepname>(<secname>).
This message might indicate a compiler fault. Contact your supplier.
L6664W: Relocation #<rel_class>:<rel_number> in <objname>(<secname>) is with respect
to a symbol(#<idx> before last Map Symbol #<last>).
The linker has not been told to look in the libraries and so cannot find the symbol printf.
This also causes the following error:
L6218E: Undefined symbol printf (referred from L6665W.o).
If you do not want the libraries, then ignore this message. Otherwise, to fix both the error and
the warning uncomment the line:
IMPORT ||Lib$$Request$$armlib||
L6679W: Data in output ELF section #<sec> '<secname>' was not suitable for
compression (<data_size> bytes to <compressed_size> bytes).
L6682E: Merge Section <oepname>(<spname>) is a code section
L6683E: Merge Section <oepname>(<spname>) has an element size of zero
L6684E: Section <spname> from object <oepname> has SHF_STRINGS flag but not SHF_MERGE
flag
L6685E: Section <spname> from object <oepname> has a branch reloc <rel_idx> to a
SHF_MERGE section
L6688U: Relocation #<rel_class>:<rel_idx> in <oepname>(<spname>) references a
negative element
L6689U: Relocation #<rel_class>:<rel_idx> in <oepname>(<spname>). Destination is in
the middle of a multibyte character
L6690U: Merge Section <spname> from object <oepname> has no symbols
L6703W: Section <er> implicitly marked as non-compressible.
L6707E: Padding value not specified with PADVALUE attribute for execution region
<regionname>.
See the following in the armlink User Guide:
Execution region attributes.
L6708E: Could not process debug frame from <secname> from object <oepname>.
L6709E: Could not associate fde from <secname> from object <oepname>.
L6713W: Function at offset <offset> in <oepname>(<secname>) has no symbol.
L6714W: Exception index table section .ARM.exidx from object <oepname> has no data.
L6720U: Exception table <spname> from object <oepname> present in image, --
noexceptions specified.
See the following in the armlink User Guide:
--exceptions, --no_exceptions.
L6721E: Section #<secnum> '<secname>' in <oepname> is not recognized and cannot be
processed generically.
L6725W: Unused virtual function elimination might not work correctly, because there
are dynamic relocations.
L6728U: Link order dependency on invalid section number <to> from section number
<from>.
Example:
AREA foo, CODE, READONLY
CODE32
ENTRY
KEEP
func proc
NOP
ENDP
DCD foo
END
In RVCT 2.0 and earlier, the linker determines whether interworking is needed based on the
content, which in this example is ARM code. In RVCT 2.1 and later, the linker follows the ABI,
which defines that it is the type of the symbol, in this example STT_SECTION (which is
interpreted as data), that determines whether interworking is applied.
The simplest solution is to move the data into a separate data area in the assembly source file.
Alternatively, you can use --diag_suppress 6730 to suppress this warning.
L6731W: Unused virtual function elimination might not work correctly, because the
section referred to from <secname> does not exist.
L6733W: <objname>(<secname>) contains offset relocation from <lr1name> to <lr2name>,
load regions must be rigidly relative.
L6738E: Relocation #<rel_class>:<relocnum> in <oepname>(<secname>) with respect to
<wrtsym> is a GOT-relative relocation, but _GLOBAL_OFFSET_TABLE_ is undefined.
Some GNU produced images can refer to the symbol named _GLOBAL_OFFSET_TABLE_. If there
are no GOT Slot generating relocations and the linker is unable to pick a suitable address for the
GOT base the linker issues this error message.
L6739E: Version '<vername>' has a dependency to undefined version '<depname>'.
L6740W: Symbol '<symname>' versioned '<vername>' defined in '<symverscr>' but not
found in any input object.
L6741E: Versioned symbol binding should be 'local:' or 'global:'.
L6742E: Symbol '<symname>' defined by '<oepname>'. Cannot not match to default
version symbol '<defversym>'
L6743E: Relocation #<rel_class>:<index> in <oepname>(<spname>) with respect to
<symname> that has an alternate def. Internal consistency check failed
L6744E: Relocation #<rel_class>:<index> <oepname>(<spname>) with respect to undefined
symbol <symname>. Internal consistency check:
L6745E: Target CPU <cpuname> does not Support ARM, <objname>(<secname>) contains ARM
code
L6747W: Raising target architecture from <oldversion> to <newversion>.
If the linker detects objects that specify the obsolete ARMv3, it upgrades these to ARMv4 to be
usable with ARM libraries.
L6748U: Missing dynamic array, symbol table or string table in file <oepname>.
L6751E: No such sorting algorithm <str> available.
L6753E: CallTree sorting needs Entry Point to lie within a CallTree Sort ER.
L6761E: Removing symbol <symname>.
L6762E: Cannot build '<type>' PLT entries when building a <imgtype>.
L6763W: '<optname>' cannot be used when building a shared object or DLL. Switching it
off
L6764E: Cannot create a PLT entry for target architecture 4T that calls Thumb symbol
<symname>
L6765W: Shared object entry points must be ARM-state when linking architecture 4T
objects.
This can occur when linking with GNU C libraries. The GNU startup code crt1.o does not
have any build attributes for the entry point, so the linker cannot determine which execution
state (ARM or Thumb) the code runs in. Because the GNU C library startup code is ARM code,
you can safely ignore this warning, or you can suppress it by using --diag_suppress 6765.
L6766W: PLT entries for architecture 4T do not support incremental linking.
L6769E: Relocation #<rel_class>:<relocnum> in <oepname>(<secname>) with respect to
<wrtsym>. No GOTSLOTexists for symbol.
L6770E: The size and content of the dynamic array changed too late to be fixed.
L6771W: <oepname>(<secname>) contains one or more address-type relocations in RO
data. Making section RW to be dynamically relocated at run-time.
L6772W: IMPORT <symname> command ignored when building --sysv.
See the following in the armlink User Guide:
• --sysv.
• IMPORT steering file command.
L6774W: <objname>(<secname>) has debug frame entries of a bad length.
L6775W: <objname>(<secname>) has FDEs which use CIEs which are not in this section.
L6776W: The debug frame in <objname>(<secname>) does not describe an executable
section.
L6777W: The debug frame in <objname>(<secname>) has <actual> relocations (expected
<expected>)
L6778W: The debug frame in <objname>(<secname>) uses 64-bit DWARF.
L6780W: <origvis> visibility removed from symbol '<symname>' through <impexp>.
L6781E: Value(<val>) Cannot be represented by partition number <part> for relocation
#<rel_class>:<rel_number> (<rtype>, wrt symbol <symname>) in <objname>(<secname>)
L6782W: Relocation #<rel_class>:<relnum> '<rtype>' in <oepname> may not access data
correctly alongside <pltgot_type> PLT entries
L6783E: Mapping symbol #<symnum> '<msym>' in <oepname>(<secnum>:<secname>) defined at
the end of, or beyond, the section size (symbol offset=0x<moffset>, section
size=0x<moffset>, section size=0x<secsize>)
This indicates that the address for a section points to a location at the end of or outside of the
ELF section. This can be caused by an empty inlined data section and indicates there might be a
problem with the object file. You can use --diag_warning 6783 to suppress this error.
L6784E: Symbol #<symnum> '<symname>' in <oepname>(<secnum>:<secname>) with value
<value> has size 0x<size> that extends to outside the section.
The linker encountered a symbol with a size that extends outside of its containing section. This
message is only a warning by default in the RVCT 2.2 build 503 and later toolchains. Use
--diag_warning 6784 to suppress this error.
L6785U: Symbol '<symname>' marked for import from '<libname>' already defined by
'<oepname>'
L6786W: Mapping symbol #<symnum> '<msym>' in <oepname>(<secnum>:<secname>) defined at
unaligned offset=0x<moffset>
L6787U: Region table handler '<handlername>' needed by entry for <regionname> was not
found.
and reports:
Error: L6788E: Scatter-loading of execution region EXEC2 will cause the contents of
execution region EXEC2 to be corrupted at run-time.
reports:
Error: L6801E: a.o(.text) containing ARM code cannot use the address of '~IW' Thumb
function foo.
or
Error: L6915E: Library reports error: The semihosting __user_initial_stackheap
cannot reliably set up a usable heap region if scatter loading is in use
It is most likely that you have not re-implemented __user_setup_stackheap() or you have
not defined ARM_LIB_STACK or ARM_LIB_HEAP regions in the respective scatter file.
Note
__user_setup_stackheap() supersedes the deprecated function
__user_initial_stackheap().
This error can appear when retargeting semihosting-using functions, to avoid any SVC or
BKPT instructions being linked-in from the C libraries.
Ensure that no semihosting-using functions are linked in from the C library by using:
#pragma import(__use_no_semihosting)
See the following in the ARM C and C++ Libraries and Floating-Point Support User Guide:
Using the libraries in a nonsemihosting environment.
If there are still semihosting-using functions being linked in, the linker reports this error.
To resolve this, you must provide your own implementations of these C library functions.
The emb_sw_dev directory contains examples of how to re-implement some of the more
common semihosting-using functions. See the file retarget.c.
See the following for more information on semihosting-using C library functions:
ARM C and C++ Libraries and Floating-Point Support User Guide.
Note
The linker does not report any semihosting-using functions such as, for example,
__semihost(), in your own application code.
To identify which semihosting-using functions are still being linked-in from the C libraries:
1. Link with armlink --verbose --list err.txt
2. Search err.txt for occurrences of __I$use$semihosting
For example:
...
Loading member sys_exit.o from c_4.l.
reference : __I$use$semihosting
definition: _sys_exit
...
This shows that the semihosting-using function _sys_exit is linked-in from the C
library. To prevent this, you must provide your own implementation of this function.
• Error: L6915E: Library reports error:__use_no_heap was requested, but <reason>
was referenced
The variable has the type ZI, and the linker attempts to place it at address 0x200000. However,
this address is reserved for RW sections by the scatter file. This produces the error:
Error: L6971E: stdio_streams.o(.data) type RW incompatible with
main.o(.ARM.__AT_0x00200000) type ZI in er RAM.
To fix this, change the address in your source code, for example:
int variable __attribute__((at(0x210000)));
Describes the error and warning messages for the ELF image converter, fromelf.
It contains the following sections:
• 4.1 List of the fromelf error and warning messages on page 4-147.
On Windows, use:
fromelf --elf --strip=all t.a(test*.o) -o filtered/
Describes the error and warning messages for the ARM librarian, armar.
It contains the following sections:
• 5.1 List of the armar error and warning messages on page 5-150.
Describes error and warning messages that might be displayed by any of the tools.
It contains the following sections:
• 6.1 Internal faults and other unexpected failures on page 6-152.
• 6.2 List of other error and warning messages on page 6-153.
contains:
• The message description (Internal fault).
• A six hex digit fault code for the error that occurred (0x87ecef).
In RVCT 2.2 and earlier this was a four digit code.
• The version number (505 is ARM Compiler 5.05).
• The build number (1234 in this example).
If you see an internal fault, contact your supplier.
To facilitate the investigation, try to send only the single source file or function that is causing the error,
plus the command-line options used.
It might be necessary to preprocess the file (that is, to take account of files added with #include). To do
this, pass the file through the preprocessor as follows:
armcc <options> –E sourcefile.c > PPsourcefile.c
where <options> are your normal compile switches, such as -O2, -g, -I, -D, but without -c.
Check that the error is still reproducible with the preprocessed file. For example, compile it with:
armcc <options> -c PPsourcefile.c
Then provide the PPsourcefile.c file and the <options> to your supplier.
Note
When the message is displayed, the X prefixing the message number is replaced by an appropriate letter
relating to the tool. For example, the code X3900U is displayed as L3900U by the linker when you have
specified an unrecognized option.
Describes the technical changes that have been made to the Errors and Warnings Reference Guide.
It contains the following sections:
• A.1 Revisions for Errors and Warnings Reference Guide on page Appx-A-155.
Changes to the compiler messages: 1.2 List of the armcc error and warning messages
• Added error and warning messages 3082 to 3720 inclusive. These are new on page 1-12
in ARM Compiler 5.05.
• Moved the messages in the form C4XXX into the list of armcc error and
warning messages.
• Mentioned that C4017W is suppressed by default.
Changes to the linker messages: 3.2 List of the armlink error and warning messages
• Added more detail for L6221E. on page 3-107
Changes to the assembler messages: 2.1 List of the armasm error and warning messages
• Added all missing error and warning messages. on page 2-77
• Added a description for A1871E.
Changed references to environment variables from ARMCCnINC and • 1.2 List of the armcc error and warning
ARMCCnLIB to ARMCC5INC and ARMCC5LIB. messages on page 1-12
• 3.2 List of the armlink error and warning
messages on page 3-107
Changes to the compiler messages: 1.2 List of the armcc error and warning messages
• Added more detail for 95, 1043, 1083, 1296, 1559. on page 1-12
• Updated message ID numbers to reflect renumbering of C3nnn to C4nnn.
• Removed obsolete messages C3000E, C3015E, C3055U, and C3064E.
Changes to the linker messages: 3.2 List of the armlink error and warning messages
• Added more detail for L6202E, L6330W. on page 3-107
• Changed the article linked to from L6238E.
Changes to the assembler messages: 2.1 List of the armasm error and warning messages
• Where appropriate, changed the term local label to numeric local label. on page 2-77
• Improved the description of A1746W.
Changes to the compiler messages: 1.2 List of the armcc error and warning messages
• Added error and warning messages 2902 to 3040 inclusive, which are new on page 1-12
in ARM Compiler 5.0.
• Added error and warning messages 3049 to 3081 inclusive, which are new
in ARM Compiler 5.01.
Enhanced the description of the linker error message L6973E. 3.2 List of the armlink error and warning messages
on page 3-107
Changes to the compiler messages: • 6.1 Internal faults and other unexpected failures
• Changed the version number component of internal compiler errors from on page 6-152
two to three digits. • 1.2 List of the armcc error and warning
• Removed messages 1113 and 2523 because they are no longer valid. messages on page 1-12
• Added the remarks 2813 and 2815.
Changes to the assembler messages: 2.1 List of the armasm error and warning messages
• Corrected the E, W or U suffix in many error and warning message codes. on page 2-77
• Added more detail for A1322E, A1477E, A1745W, A1786W, A1788W and
A1809W.
Changes to the linker messages: 3.2 List of the armlink error and warning messages
• Added cross references to the descriptions for L6218E and L6932W. on page 3-107
• Added more detail for L6242E and L6248E.
Changes to the compiler messages: 1.2 List of the armcc error and warning messages
• Added more detail for error 1558. on page 1-12
Changes to the assembler messages: 2.1 List of the armasm error and warning messages
• Removed messages A1588E, A1589E, A1597E, A1613E, A1614E, and on page 2-77
A1646W, because they are not reachable.
Changes to the compiler messages: 1.2 List of the armcc error and warning messages
• Added messages C3335E, C3336W, C3337E, and C3338W. on page 1-12
• Removed error C3053W, because --profile is deprecated.
• Added cross references to various messages.
Changes to the assembler messages: 2.1 List of the armasm error and warning messages
• Added messages A1903E, A1907W, A1908E, and A1909E. on page 2-77
• Added cross references to A1450W.
Changes to the linker messages: 3.2 List of the armlink error and warning messages
• Added L6064E. on page 3-107
• Corrected examples for L6216E.
• Added L6815U.
• Updated the description of L6002U.
• Updated the description of L6310W.
• Added cross references to various messages.
Changes to the fromelf messages: 4.1 List of the fromelf error and warning messages
• Added cross references to various messages. on page 4-147
Changes to the linker messages: 3.2 List of the armlink error and warning messages
• Added L6058E. on page 3-107
• Added L6828E.
Changes to the compiler messages: 1.2 List of the armcc error and warning messages
• Added more detail for 631 and 634. on page 1-12
Changes to the assembler messages: 2.1 List of the armasm error and warning messages
• Removed A1590E. on page 2-77
• Added more detail for A1746W.
Changes to the linker messages: 3.2 List of the armlink error and warning messages
• Added L6065E. on page 3-107
• Added more detail for L6220E, L6221E, L6384E, L6915E, and L6971E.
• Added cross-references for L6224E and L6469E.
Changes to the fromelf messages: 4.1 List of the fromelf error and warning messages
• Added more detail for errors Q0122E, Q0128E, and Q0147E. on page 4-147