RAD Studio
ContentsIndex
PreviousUpNext
C++ Compiler Errors And Warnings (C++)

This section describes the RAD Studio C++ compiler error and warning messages.

Name 
Description 
The compiler issues this error if the currently compiled class doesn't have the same MOM (Microsoft Object Model) related flags set as its direct parent.
This compiler error message is deprecated. 
You attempted to use a feature defined in xstring, part of the Dinkumware standard C++ library. The C++ compiler could not generate a precompiled header because there is a constant (defined in xstring) in the header. If you want to include xstring, you should first set the define _PCH_STATIC_CONST. 
Properties typically have both a getter and a setter, but a property cannot serve as either the getter or setter of another property. 
The calling convention for access functions of a property (read, write, and stored) declared in a __published section must be __fastcall. This also applies to hoisted properties.
 
This message is emitted when an expression you are evaluating while debugging includes a function call that terminates with an unhandled exception. For example, if in the debugger's evaluate dialog, you request an evaluation of the expression foo()+1 and the execution of the function foo() causes a GP fault, this evaluation produces the above error message.
You may also see this message in the watches window because it also displays the results of evaluating an expression. 
In the following code, explicit template arguments are necessary:  
If, during instantiation of a type, an array dimension cannot be computed—usually this is due to some other error which would be reported—then this error will result.
For example, if an array dimension is dependent upon a template parameter but an error occurs while it is being parsed and the template argument being substituted does not yield a legal constant expression, this error is displayed. 
The inline assembler has detected a numeric overflow in one of your expressions. Make sure all of your numbers can fit in 32 bits. 
Help is not available for this item. 
This is an internal compiler error. A class marked as a delphireturn class has more than one non-static data member. 
You have entered a command element that the C++ compiler cannot parse, or the option you entered has no associated help. Try again. 
An attempt was made in a source file to set an option that cannot be set after either parsing or compiling of the file starts. Instead, set this option on the command line or in a .cfg file.
For example, if a source file contains a #pragma option push —v, you need to remove the push or set /unset this option either on the command line or in a .cfg file. 
An attempt was made in a source file to set an option that must be set before compiling starts. Instead, set this option on the command line, in a .cfg file, or at the top of the source file before the line int foo();
Both the -g and the -j command line options can be followed by an optional number. The compiler expects this number to be between 0 and 255 inclusive. 
Assignments to properties should be made in simple assignment statements. If property assignments could become Lvalues, which happens when property assignments are embedded in larger statements, the getter is called to create the Lvalue, with all the side effects that getter causes. The compiler allows only one call to either the getter or the setter in a statement.
For example:  
The following code is illegal:  
It is illegal for a declarator list to follow a template class declaration. For example:  
The generic form of a template must be referenced using specialization parameters. For example, for a template class named foo, taking two template parameters, then a legal reference might have the form  
This error results when attempting to use a template template parameter in any way other than to reference a template specialization, or to pass that parameter in turn as a template template argument to another template. For example:  
When parsing code that depends in some way upon a template parameter, it is sometimes impossible to know whether a member name will resolve to a template function name, or a regular parameter. In the following code, a 'template' qualifier is required in order to know if the '<' (less-then) operator should be parsed as the beginning character of a template argument list, or as a regular less-than operator:  
Help is not available for this item. 
You can use #pragma checkoption to check that certain switches are in the state that you expect. If #pragma checkoption detects that a switch is not in the expected state, the compiler displays this error.
You can use the following syntax:  
You tried to use dynamic with a template member function. Dynamic functions are allowed for classes derived from TObject. Dynamic functions occupy a slot in every object that defines them, not in any descendants. That is, dynamic functions are virtual functions stored in sparse virtual tables. If you call a dynamic function, and that function is not defined in your object, the virtual tables of its ancestors are searched until the function is found. 
This is an internal compiler error. The compiler emits this message if the keyword __far16 is mixed with one of the keywords __pascal or __cdecl, all in the same declaration. 
Not used 
Where problem can be any of the following relating to problems with the various attributes of #include:
unexpected import directive value attribute 'attribute'A value was supplied for the indicated attribute. None was expected.
missing ')' in import directive attribute 'attribute'The value for the indicated attribute was incorrectly specified : a closing parenthesis is missing.
unrecognized import directive attribute 'attribute'The indicated token is not a legitimate attribute for the #import directive.
invalid values for raw_property_prefixes attributeThe values for the raw_property_prefixes attribute were incorrectly specified.
unexpected duplicate property 'property'The indicated #import attribute was specified more than once -- this is an... more 
This error occurs when you use:  
A _declspec modifier was given that is not valid. 
The GUID string does not have the form of a Globally Unique Identifier. 
This error happens when you used the wrong format to define your GuidString. GUIDs are defined for structs in the following way:  
The uuidof operator was given an incorrect argument. 
A macro argument that was started on the line listed has not been properly terminated 
If this error is triggered, it means that recursive template instantiation has gone too deep. Check for compile-time recursion in your program, and limit it to no more than 256 levels. 
If this error is triggered, it means that recursive template instantiation has gone too deep. Check for compile-time recursion in your program, and limit it to no more than 256 levels. 
Too many VIRDEF symbols were allocated. The compiler imposes a limit to the number of VIRDEFs allowed per translation unit. Currently this limit is in the order of 16384 VIRDEFs.
One way this could happen is if a program has more than 16384 functions. 
Static const class members, which are initialized in the body of the class, have to be initialized with a constant expression of integral type. 
Destructors defined in VCL style classes have to be virtual.
 
The C++ compiler requires that the members of an anonymous struct or union be named. 
Internal compiler error. In some cases, the compiler will enforce restrictions on a class hierarchy. In this case, the restrictions would be that all classes are abstract classes, and all classes only have one parent. 
The compiler expected an equal sign in the position where the error was reported but there was none. This is usually a syntax error or typo. 
Internal compiler error. In some cases, the compiler will enforce restrictions on a class hierarchy. In this case, the restrictions would be that the first parent of a class is a Delphi style class. 
If a declaration within a template class acquires a function type through a type dependent on a template-parameter and this results in a declaration that does not use the syntactic form of a function declarator to have function type, the program is ill-formed. For example:  
You are trying to make a generic template into a specialized member. For example, the following code is illegal:  
You attempted to declare a symbol as static or inline and this type of symbol cannot be defined as static or inline. Certain functions, like 'main' and 'WinMain' cannot be declared static or inline. 'main' is the entrypoint of console applications, and 'WinMain' is the entry point of Windows applications.
For example, this error is displayed in the following cases:  
This happens when you use the __uuidof operator without including a header that defines the GUID struct. So the following program code would display this error:  
When reference a class template specialization, it is possible that more than one possible candidate might result from a single reference. This can only really happen among class partial specializations, when more than one partial specialization is contending for a possible match:  
Certain functions, like 'main' and 'WinMain' cannot be declared as a template function. 'main' is the entrypoint of console applications, and 'WinMain' is the entry point of Windows applications.
For example:  
This error will result if an attempt is made to reference a template class or function in a manner which yields no possible candidate specializations. For example:  
This error is no longer generated by the compiler. 
A variable or type was used in a context requiring a GUID, but the type does not have a GUID associated with it. GUIDs are associated with types using _declspec (uuid(GUID)). 
Data type mismatch resulting in an erroneous function call. The object of the call (a non-const function) should be a const object. 
Data type mismatch. The error is the result of an erroneous function call. The object of the call (a non-volatile function) should be a volatile object. 
The compiler issues this error if it cannot generate RTTI information for the return type of a parameter. See Runtime type information for more information. 
The compiler issues this error if the it cannot generate RTTI information for the return type of a function. See Runtime type information for more information. 
The first type is not a direct base class of the second type. A direct base class refers to the immediate derivations of that class, and not the derivations of its subclasses. 
In looking up include files, the C++ compiler has encountered a file whose path name contains more characters than are allowed in the Windows maximum. Rename the path to a shorter name. 
GUID's attached to structs have to be the same across multiple declarations and definitions of the same struct. So the following example would cause this error:  
You cannot use __declspec(selectany) with static variables, unitialized variables, etc. 
The compiler expected a string constant at this location but did not receive one.
This error is no longer generated by the compiler. 
There are times when the compiler does not expect a string constant to appear in the source input. For example:  
When declaring or defining a template class partial specialization, it is illegal to involve any of the non-type template parameters in complex expressions. They may only be referenced by name. For example:  
A partial specialization may not use a template parameter in its specialization argument list which is dependent on another type parameter. For example:  
When declaring a partial specialization, its specialization argument list must differ in some way from its basic parameter list. For example:
template<class T>  
When referencing a template specialization, all type parameters must be satisfied using type arguments, all non-type parameters require non-type arguments, and all template template parameters require either a template name, or another template template argument. Mismatching these requirements in any way will trigger the above error. For example:  
A partial specialization cannot reference other template parameters in a nonvalue argument expression, unless it is simply a direct reference to the template parameter. For example:  
There are two ways to trigger this error. If –A is enabled (ANSI compliant mode), then attempting to explicitly instantiate a template specialization which has already been instantiated (either implicitly or explicitly) will cause this error. Regardless of –A, attempting to explicitly specialize a template specialization which has already been either implicit or explicitly instantiated will always trigger this error. For example:  
A template parameter has no address, and is not associated with any real "object". Therefore, to take its address, or attempt to assign to it, has no meaning. For example:  
The compiler no longer generates this error. 
Only integral constant expressions, and the address of global variables with external linkage, may be used as template arguments. For example:  
Non-type template arguments may only be of integral type, or the address of a global variable. They cannot be the address of an array element. For example:  
When instantiating a template class definition, if it is found that a declared base class does not resolve to an accessible class type, this error will result. For example:  
The compiler no longer generates this error. 
If a template declaration references a member of a dependent type, it is only possible to alert the user to the non-existence of this member during type instantiation for a given set of template arguments. For example:  
If a template specialization reference within a template declaration yields a reference to a non-template during type instantiation, the above error will result. For example:  
If a dependent name reference within a template declaration results in a non-struct member qualification at instantiation time, the above error will result. For example:  
If a template declaration references a member of a dependent type, it is only possible to alert the user to the non-existence of this member during type instantiation for a given set of template arguments. For example:  
Template functions, and class partial specializations, may not use default expressions in their template parameter lists. Only primary template declarations may do this. For example:  
This error is no longer generated by the compiler. 
If a friend template is declared, but no template parameters are specified, this error will result. For example:  
Non-type template arguments may only be of integral type, or the address of a global variable. They cannot be the address of a class member. For example:  
If a member function of a class template is declared, and then a specialization of that class implicitly instantiated, and later that member function defined with default parameters specified, the above error will result. For example:  
The compiler no longer generates this error. 
Destructors cannot be templates. For example:  
Attempting to explicitly specialize a static data member or any non-template will cause this error. 
Explicit and partial specialization of member template classes and functions within template classes and nested template classes, is not supported. 
The compiler no longer generates this error. 
The compiler no longer generates this error. 
The compiler only supports 256 levels of instantiation before it will trigger this error. The main problem is in controlling stack depth, because the parser uses recursive functions to manage type instantiation. Here is an example that would produce such an error:  
Explicit instantiation cannot be specified at any level other than namespace or global scope. For example:  
If a template is declared at one point in the translation unit, and then redeclared with template parameters of a different kind at another location, this error will result. For example:  
Attempting to explicit specialize or instantiate a template which does not exist is clearly illegal. For example:  
No other function or type may have the same name as a template class. For example:  
Attempting to declare a function that overrides the name of a template class will cause this error. For example:  
According to the standard, explicit specialization of any template now always require the "template<>" declarator syntax. For example:  
An explicit specialization of a function may not declare default function arguments. For example:  
'main' cannot be declared as a template function. 'main' is the entry point of a console application, and it should be declared as a regular __cdecl function.
This error message should not occur because it has been replaced with another one (E2475). 
Internal compiler error. 
If a template is redeclared with a different number of template parameters, this error will result. For example:  
If a member declaration or definition occurs outside of a template class, and that outer declaration uses a different number of template parameters than the parent class, this error will result. For example:  
If a member declaration or definition occurs outside of a template class, and that outer declaration uses a different number of template parameters than the parent class, this error will result. For example:  
Non-type template parameters are restricted as to what type they may be. Floating point, class and void types are illegal. For example:  
In a context where at least one template parameter is clearly required, if none are found this error will result. For example:  
If a member template is being defined outside of its parent class, and too many template parameter sets are declared, this error will result. For example:  
If a template template parameter is to have a default type, that type must either be a generic template class name, or another template template parameter.  
Whenever the "typename" keyword is used in a template declaration or definition, it should always name a dependent type. For example:  
A template template parameter must always declare a new class name. For example:  
The "typename" keyword must only be used within template declarations and definitions. 
The compiler no longer generates this error. 
Whenever a compiler error occurs while instantiating a template type, the context of what was being instantiated at that point in time will be reported to the user, in order to aid in detection of the problem. 
This error occurs when the compiler is trying to access TypeLibImport.dll but it either can't find it, it was corrupted, or you have the wrong version of it installed on your computer. You can reinstall it from the product CD. 
When you use the 'typeid' function, you have to include the <typeinfo> header, otherwise you will get syntax errors.
For example, consider a test case with the following code:  
You are trying to overload a member during template instantiation. You cannot have calls to overloaded constant functions within array bounds initializers, for example. 
The using keyword cannot refer to a template specialization. 
The 'virtual' keyword can only be applied to regular member functions, not to member template functions.
Consider a test case with the following code:  
The directive #pragma alias is used to tell the linker that two identifier names are equivalent. You must put the two names in quotes.
You will receive this warning if you don't use pragma alias correctly. For example, the following two lines both generate this warning:  
The main function has been created as static, and as such cannot be used as a valid entry point.
Consider:  
The #pragma codeseg directive can be used to set or reset the name, class, and group of a segment. You have to follow the exact syntax mentioned in the warning message, and all names are optional.
So these are all legal:  
The directive #pragma comment can be used to emit linker comment records.
In this message, <type> can be any of the following:
  • user
  • lib
  • exestr
  • linker
The type should be there but the string is optional. 
This warning is used to indicate when a certain function, which has been declared inline in one location, is redefined in another location to be non-inline. 
A class that contains constant or reference members (or both) must have at least one user-defined constructor.
Otherwise, there would be no way to ever initialize such members. 
You can use pragma message to emit a message to the command line or to the message window. You would get this warning if you use the incorrect syntax, so  
This warning is issued when the compiler detects a multi-character integer constant, such as:  
Pragma code_seg is similar to pragma codeseg, but with this one you can only modify the name and the class of a code segment. If you use the wrong syntax, you get this warning.
The following examples show the correct usage:  
Each #pragma pack(pop) should have a matching preceding #pragma pack(push) in the same translation unit. Pairs of 'push' and 'pop' can be nested.
For example:  
Your program has a #pragma pop at a place where it can't restore options.
For example:  
This warning indicates that several operators used in one expression might cause confusion about the applicable operator precedence rules. The warning helps create code that is more easy to understand and potentially less ambiguous.
For example, compile the following code using the –w command line option:  
An argument that is not an iterator is being used with an STL algorithm that requires an iterator. 
A type that is being used with an STL container has a private 'operator=='. 
A type that is being used with an STL container has a private 'operator<'. The type you're trying to use must be made public. 
The type that is being used for an STL container has a private 'operator<'. The type that is being contained (type::operator) must be a public type.
For example, if you were trying to instantiate a class type "vector<blah>", the error would be:  
An incorrect iterator category is being used with an STL algorithm. 
You are trying to explicitly instantiate a template that was already implicitly instantiated.
If –A is not enabled and an attempt is made to explicitly instantiate a specialization which has already been either implicitly or explicitly instantiated, this error will result. 
Internal error. This warning is no longer generated by the compiler.
The following code is illegal:  
The compiler displays status information while compiling if you have checked "Show general messages" on the Compiler page of the Project Options dialog box. Most of the messages are self-explanatory and state information about compiling and linking; for example:  
An expression takes the address of a class member function, but this member function was not found in the program being debugged. The evaluator issues this message. 
This error occurs if the work disk is full or write protected.
This error also occurs if the output directory does not exist.
Solutions
If the disk is full, try deleting unneeded files and restarting the compilation.
If the disk is write-protected, move the source files to a writeable disk and restart the compilation. 
This message is issued when an #error directive is processed in the source file.
'message' is the text of the #error directive. 
An error occurred in the internal logic of the compiler. This error shouldn't occur in practice, but is generated in the event that a more specific error message is not available. 
You have used an intrinsic function without supplying a prototype. You may have supplied a prototype for an intrinsic function that was not what the compiler expected. 
An expression on the indicated line of the source file caused the code generator to be unable to generate code. Avoid using the expression. Notify CodeGear if an expression consistently reproduces this error. 
This error occurs if the source file can't be found.
Check the spelling of the name. Make sure the file is on the specified disk or directory.
Verify that the proper directory paths are listed. If multiple paths are required, use a semicolon to separate them. 
Possible Causes
An expression on the indicated line of the source file was so complicated that the code generator could not generate code for it.
Solutions
Simplify the expression. If this does not solve the problem, avoid the expression.
Notify CodeGear if an expression can consistently reproduce this error. 
The compiler's stack has overflowed. This can be caused by a number of things, among them deeply nested statements in a function body (for example, if/else) or expressions with a large number of operands. You must simplify your code if this message occurs. Adding more memory to your system will not help. 
A DOS error that prevents the C++ IDE from writing an .OBJ, .EXE, or temporary file.
Solutions
Make sure that the Output directory in the Directories dialog box is a valid directory.
Check that there is enough free disk space. 
One of the compiler's internal tables overflowed.
This usually means that the module being compiled contains too many function bodies.
This limitation will not be solved by making more memory available to the compiler. You need to simplify the file being compiled. 
This message flags (directly or indirectly) recursive #include directives. 
The total working storage is exhausted.
This error can occur in the following circumstances:
  • Not enough virtual memory is available for compiling a particular file. In this case, shut down any other concurrent applications. You may also try to reconfigure your machine for more available virtual memory, or break up the source file being compiled into smaller separate components. You can also compile the file on a system with more available RAM.
  • The compiler has encountered an exceedingly complex or long expression at the line indicated and has insufficient reserves to parse it. Break the expression down into separate statements.... more 
This error occurs if the specified file can't be opened.
Make sure the file is on the specified disk or directory. Verify the proper paths are listed. If multiple paths are required, use a semicolon to separate them. 
Use the -2 command-line compiler option to enable 286/287 opcodes. Be aware that the resulting code cannot be run on 8086- and 8088-based machines. 
The program called abort because there wasn't enough memory to execute.
This message can be caused by memory overwrites. 
A C++ derived class can modify the access rights of a base class member, but only by restoring it to the rights in the base class.
It can't add or reduce access rights. 
It is not legal to take the address of a bit field, although you can take the address of other kinds of fields. 
The only arithmetic operation that can be performed on a relocatable symbol in an assembler operand is addition or subtraction of a constant.
Variables, procedures, functions, and labels are relocatable symbols. 
The parameter type lists in the declarations of these two functions do not differ enough to tell them apart.
Try changing the order of parameters or the type of a parameter in one declaration. 
You must qualify the member reference with the appropriate base class name.
In C++ class 'class', member 'member' can be found in more than one base class, and it was not qualified to indicate which one you meant.
This applies only in multiple inheritance, where the member name in each base class is not hidden by the same member name in a derived class on the same path.
The C++ language rules require that this test for ambiguity be made before checking for access rights (private, protected, public).
It is possible to get this message even though only one (or... more 
Both of the named overloaded functions could be used with the supplied parameters.
This ambiguity is not allowed. 
Whenever a structure member name is used in inline assembly, such a name must be unique. (If it is defined in more than one structure, all of the definitions must agree as to its type and offset within the structures). In this case, an ambiguous member name has been used.
For example:  
The compiler found a declaration for a member function or static member in an anonymous union.
Such unions can only contain data members. 
In C++, a global anonymous union at the file level must be static. 
The declared array is larger than 64K and the 'huge' keyword was not used.
If you need an array of this size, either use the 'huge' modifier, like this:  
This indicates an illegal operation on an object declared to be const, such as an assignment to the object. 
In early versions of C++, the only way to control allocation of class of objects was by assigning to the 'this' parameter inside a constructor.
This practice is no longer allowed, because a better, safer, and more general technique is to define a member function operator new instead.
For example:  
Inline assembly statements can't be longer than 480 bytes. 
Only member function declarations are allowed in __automated sections.
 
The calling convention for functions declared in an __automated section must be __fastcall.
 
Only member function declarations are allowed in __automated sections.
 
Storage specifiers stored, default, and nodefault are not allowed in property declarations in __automated sections.
 
If you declare a property in an __automated section it has be a new declaration. Property hoisting is not allowed.
 
Your source file used the address-of operator (&) with an expression that can't be used that way; for example, a register variable. 
The C++ operator -> function must be declared to either return a class or a pointer to a class (or struct or union).
In either case, it must be something to which the -> operator can be applied. 
You are attempting to declare 'identifier' to be a base class, but either it is not a class or it has not yet been fully defined.
Correct the name or rearrange the declarations. 
The compiler encountered a break statement outside a switch or looping construct.
You can only use break statements inside of switch statements or loops. 
A cast from type 'ident1' to type 'ident2' is not allowed.
In C++, you cannot cast a member function pointer to a normal function pointer.
For example:  
The compiler encountered a continue statement outside a looping construct. 
An assignment, initialization, or expression requires the specified type conversion to be performed, but the conversion is not legal.
In C++, the compiler will convert one function pointer to another only if the signature for the functions are the same. Signature refers to the arguments and return type of the function. For example:  
This C++ type conversion member function specifies a return type different from the type itself.
A declaration for conversion function operator can't specify any return type. 
Constructors of the form  
The compiler encountered a decimal point in a floating-point constant as part of the exponent. 
The compiler found no colon after the default keyword. 
E2043 Declare operator delete[] (void*) or (void*, size_t)Compiler error
Declare the operator delete with one of the following:
1.A single void* parameter, or
2.A second parameter of type size_t
If you use the second version, it will be used in preference to the first version.
The global operator delete can only be declared using the single-parameter form. 
E2044 operator delete[] must return voidCompiler error
This C++ overloaded operator delete was declared in some other way.
Declare the operator delete with one of the following:
1.A single void* parameter, or
2.A second parameter of type size_t
If you use the second version, it will be used in preference to the first version.
The global operator delete can only be declared using the single-parameter form. 
In a C++ class, the tilde (~) introduces a declaration for the class destructor.
The name of the destructor must be same as the class name.
In your source file, the ~ preceded some other name. 
The compiler encountered a # character at the beginning of a line. The directive name that followed the # was not one of the following:  
Include and line directive file names must be surrounded by quotes ("filename.h") or angle brackets (<filename.h>).
The file name was missing the opening quote or angle bracket.
If a macro was used, the resulting expansion text is not surrounded by quote marks. 
An identifier must immediately follow a period operator (.). This is a rare message that can only occur in some specialized inline assembly statements.
Example  
The compiler encountered an #elif directive without any matching #if, #ifdef, or #ifndef directive. 
The compiler encountered an else statement without a matching if statement.
Possible Causes
  • An extra "else" statement
  • An extra semicolon
  • Missing braces
  • Some syntax error in a previous "if" statement
 
The compiler encountered an #else directive without any matching #if, #ifdef, or #ifndef directive. 
The compiler encountered an #endif directive without any matching #if, #ifdef, or #ifndef directive. 
In the C++ construction  
Floating-point operands are not allowed in these operators
  • shift (SHL, SHR)
  • bitwise Boolean (AND, OR, XOR, NOT)
  • conditional (? :)
  • indirection (*)
  • certain others
The compiler found a floating-point operand with one of these prohibited operators. 
A friend of a C++ class must be a function or another class. 
The indirection operator (*) requires a pointer as the operand.
Example  
Initializations must be one of the following:
  • constant expressions
  • the address of a global extern or static variable plus or minus a constant
 
You are attempting to initialize an object of type 'type1' with a value of type 'type2' which is not allowed.
The rules for initialization are essentially the same as for assignment. 
Only data members can be initialized in the initializers of a constructor.
This message means that the list includes a static member or function member.
Static members must be initialized outside of the class, for example:  
Pointers to class members can only be passed as arguments to functions, or used with the following operators:
  • assignment operators
  • comparison operators
  • .*
  • —>*
  • ?: conditional (ternary) operator
  • && logical AND operator
  • || logical OR operator
The compiler has encountered a member pointer being used with a different operator.
In order to call a member function pointer, one must supply an instance of the class for it to call upon.
For example:  
E2071 Operator new[] must have an initial parameter of type size_tCompiler error
Operator new can be declared with an arbitrary number of parameters.
It must always have at least one, the amount of space to allocate. 
This C++ overloaded operator new was declared in some other way. 
An error has occurred in either the configuration file or a command-line option. The compiler may not have recognized the configuration file parameter as legal; check for a preceding hyphen (-), or the compiler may not have recognized the command-line parameter as legal.
This error can also occur if you use a #pragma option in your code with an invalid option. 
Almost all C++ operators can be overloaded.
These are the only ones that can't be overloaded:
  • the field-selection dot (.)
  • dot-star (.*)
  • double colon (::)
  • conditional expression (?:)
The preprocessor operators (# and ##) are not C or C++ language operators and thus can't be overloaded.
Other non-operator punctuation, such as semicolon (;), can't be overloaded. 
This C++ operator function was incorrectly declared with more than one parameter. 
When operator ++ or operator -- is declared as a member function, it must be declared to take either:
  • No parameters (for the prefix version of the operator), or
  • One parameter of type int (for the postfix version)
 
This C++ operator function was incorrectly declared with parameters. 
When operator ++ or operator -- is declared as a non-member function, it must be declared to take either:
  • one parameter (for the prefix version of the operator), or
  • two parameters (for the postfix version)
 
This C++ operator function was incorrectly declared with other than two parameters. 
Most C++ operator functions must have an implicit or explicit parameter of class type.
This operator function was declared outside a class and does not have an explicit parameter of class type. 
When a postfix operator ++ or operator -- is overloaded, the last parameter must be declared with the type int. 
When declaring a function (not defining it with a function body), you must use either empty parentheses or a function prototype.
A list of parameter names only is not allowed.
Example declarations  
Your source file attempted to add two pointers together. 
This is caused by attempting to subtract a pointer from a non-pointer. 
Pointers can only be used with these operators:
  • addition(+)
  • subtraction(-)
  • assignment(=)
  • comparison(==)
  • indirection(*)
  • arrow(->)
Your source file used a pointer with some other operator.
Example  
Pure virtual functions are specified by appending "= 0" to the declaration, like this:  
A C++ qualifier class::identifier can't be applied here.
A qualifier is not allowed on the following:
  • typedef names
  • function declarations (except definitions at the file level)
  • on local variables or parameters of functions
  • on a class member--except to use its own class as a qualifier (redundant but legal).
 
The C++ qualifier in the construction qual::identifier is not the name of a struct or class. 
The given storage class is not allowed here.
Probably two storage classes were specified, and only one can be given. 
Structures can only be used with dot (.), address-of (&) or assignment (=) operators, or be passed to or from a function as parameters.
The compiler encountered a structure being used with some other operator. 
You can only use a template class name without specifying its actual arguments inside a template definition.
Using a template class name without specifying its actual arguments outside a template definition is illegal. 
Your source file used a typedef symbol where a variable should appear in an expression.
Check for the declaration of the symbol and possible misspellings. 
Your source file declared some sort of forbidden type; for example, a function returning a function or array. 
The cast requested can't be done. 
A virtual function has the same argument types as one in a base class, but differs in one or more of the following:
  • Return type
  • Calling convention
  • Exception specification (throw list)
 
In a C++ class constructor, if there is more than one immediate base class, each base class constructor call in the constructor header must include the base class name. 
This error occurs when you supply a bit field with more than 16 bits. 
You can't declare a named bit field to have 0 (or less than 0) bits.
You can declare an unnamed bit field to have 0 bits.
This is a convention used to force alignment of the following bit field to a byte boundary (or to a word boundary. 
In ANSI C, bit fields may only be signed or unsigned int (not char or long, for example). 
You typed a Ctrl+Break while compiling in the IDE.
(This is not an error, just a confirmation.) 
Class and enumeration types may not be defined in a function return type, a function argument type, a conversion operator type, or the type specified in a cast.
You must define the given type before using it in one of these contexts.
Note:This error message is often the result of a missing semicolon (;) for a class declaration. You might want to verify that all the class declarations preceding the line on which the error occurred end with a semicolon. 
The function call argument list had some sort of syntax error, such as a missing or mismatched right parenthesis. 
The class being declared cannot be abstract, and therefore it cannot contain any pure functions. 
In C++ it is illegal to bypass the initialization of a local variable.
This error indicates a case label that can transfer control past this local variable. 
A case statement must have a constant expression followed by a colon.
The expression in the case statement either was missing a colon or had an extra symbol before the colon. 
The compiler encountered a case statement outside a switch statement.
This is often caused by mismatched braces. 
Character constants can only be one or two characters long. 
The linker or assembler cannot be found, or possibly the disk is bad. 
The compiler reached the end of the source file and found no closing brace.
This is most commonly caused by mismatched braces. 
If the compiler must create a temporary local variable in a conditional expression, it has no good place to call the destructor because the variable might or might not have been initialized.
The temporary can be explicitly created, as with classname(val, val), or implicitly created by some other code.
You should recast your code to eliminate this temporary value. 
A constructor or destructor has been declared as const or volatile.
This is not allowed. 
This occurs when a declaration is given that includes more than one addressing modifier on a pointer or more than one language modifier for a function.
Only one language modifier (for example, __cdecl, __pascal, or __fastcall) can be given for a function. 
C++ constructors have an implicit return type used by the compiler, but you can't declare a return type or return a value. 
You tried to declare a template in an illegal place or a namespace member outside of its namespace. 
You cannot use a namespace alias to define a namespace member outside of its namespace. 
A local type was used in an actual template type argument, which is illegal. 
You tried to define a conversion operator to the same class or a base class. 
Your source file contained a struct or union field declaration that was not followed by a semicolon.
Check previous lines for a missing semicolon. 
Declarations can't be used as the control statement for while, for, do, if, or switch statements. 
Your source file contained a declaration that was missing a symbol or had an extra symbol added to it.
Check for a missing semicolon or parenthesis on that line or on previous lines. 
This error occurs when a class containing a DDVT function attempts to inherit DDVT functions from multiple parent classes.
Currently, dynamically dispatched virtual tables do not support the use of multiple inheritance. 
If a DDVT function is declared in a derived class, the matching base class function must have the same dispatch number as the derived function. 
If a DDVT function is declared in a derived class, the matching base class function must also be dynamic. 
This error indicates a dynamically dispatched virtual table (DDVT) problem. 
In this context, an identifier was expected to complete the declaration.
This might be a typedef with no name, or an extra semicolon at file level.
In C++, it might be a class name improperly used as another kind of identifier. 
An undefined 'identifier' was found at the start of an argument in a function declarator.
Often the type name is misspelled or the type declaration is missing. This is usually caused by not including the appropriate header file. 
The default parameter value given could not be converted to the type of the parameter.
The message "Type mismatch in default argument value" is used when the parameter was not given a name.
When compiling C++ programs, this message is always preceded by another message that explains the exact reason for the type mismatch.
That other message is most often "Cannot convert 'type1' to 'type2'" but the mismatch could be due to another reason. 
A default argument expression is not allowed to use any local variables or other parameters. 
The first non-whitespace character after a #define must be an identifier.
The compiler found some other character. 
The compiler encountered more than one default statement in a single switch. 
The compiler encountered a default statement outside a switch statement.
This is most commonly caused by mismatched braces. 
It is illegal to delete a variable that is not a pointer. It is also illegal to delete a pointer to a constant.
For example:  
This error is no longer generated by the compiler. 
If a class is declared (or defaults to) near, all derived classes must also be near. 
This error is no longer generated by the compiler. 
This error is no longer generated by the compiler. 
If a class is declared (or defaults to) far, all derived classes must also be far. 
This error is no longer generated by the compiler. 
C++ destructors never return a value, and you can't declare a return type or return a value. 
The destructor for this C++ class is protected or private, and can't be accessed here to destroy the class.
If a class destructor is private, the class can't be destroyed, and thus can never be used. This is probably an error.
A protected destructor can be accessed only from derived classes.
This is a useful way to ensure that no instance of a base class is ever created, but only classes derived from it. 
Only one language modifier (cdecl pascal) can be given for a function.
This function has been declared with different language modifiers in two locations. 
Your source file contains a divide or remainder in a constant expression with a zero divisor. 
A base class can be declared public or private, but not both.
This access specifier can appear no more than once for a base class. 
A C++ class can be derived from any number of base classes, but can be directly derived from a given class only once. 
A function with this name and type was previously supplied a function body.
A function body can only be supplied once.
One cause of this error is not declaring a default constructor which you implement. For example:  
Each case of a switch statement must have a unique constant expression value. 
A declaration can never have more than one storage class, either Auto, Register, Static, or Extern. 
A declaration can never have more than one basic type. Examples of basic types are:
  • char
  • class
  • int
  • float
  • double
  • struct
  • union
  • enum
  • typedef name
 
The C++ reserved word "virtual" can appear only once in one member function declaration. 
The definition of dispids is only permitted in __automated sections.
 
You tried to divide an integer by zero, which is illegal. 
There are some restrictions on inserting literal values directly into your code with the __emit__ function.
For example, you cannot give a local variable as a parameter to __emit__. 
This compilation unit was logically empty, containing no external declarations.
ANSI C and C++ require that something be declared in the compilation unit. 
An enum declaration did not contain a properly formed list of identifiers. 
You have attempted to assign a value that is out of the range of the specified type. 
The source file ended in the middle of a comment.
This is normally caused by a missing close of comment (*/). 
The source file ended before the compiler (or MAKE) encountered #endif.
The #endif either was missing or misspelled.
Every #if statement needs a matching #endif statement. 
This is a catch-all error message when the compiler parses an expression and encounters a serious error.
Possible Causes
This is most commonly caused by one of the following:
  • two consecutive operators
  • mismatched or missing parentheses
  • a missing semicolon on the previous statement.
Solutions
If the line where the error occurred looks syntactically correct, look at the line directly above for errors.
Try moving the line with the error to a different location in the file and recompiling.
If the error still occurs at the moved statement, the syntax error is occurring somewhere in that statement.
If the error occurred... more 
An extra right brace was encountered where none was expected. Check for a missing closing brace.
Useful Tip:
The IDE has a mechanism for finding a matching curly brace. If you put the cursor on the '{' or '}' character, hold down Ctrl, hit 'Q' and then '{' or '}', it will position the cursor on the matching brace. 
The storage class extern applied to a variable means that the variable is being declared but not defined here--no storage is being allocated for it.
Therefore, you can't initialize the variable as part of the declaration. 
This error message only shows up after the messages "Multiple declaration for 'identifier'" and "Type mismatch in redeclaration of 'identifier'". It tells you where the previous definition of the identifier in question was found by the compiler, so you don't have to search for it. 
This error message occurs when a call to a function with a prototype (via a function pointer) had too few arguments. Prototypes require that all parameters be given. Make certain that your call to a function has the same parameters as the function prototype. 
A call to the named function (declared using a prototype) has too few arguments.
Make certain that the parameters in the call to the function match the parameters of the function prototype. 
The compiler is unable to find the file supplied on the command line. 
The file name given in an #include directive was too long for the compiler to process.
File names in DOS must be no more than 79 characters long. 
The error message is issued if someone tries to explicitly construct an object or call a virtual function.
In integrated debugger expression evaluation, calls to certain functions (including implicit conversion functions, constructors, destructors, overloaded operators, and inline functions) are not supported. 
Invalid format specifier following expression in the debug evaluate or watch window. A valid format specifier is an optional repeat value followed by a format character (c, d, f[n], h, x, m, p, r, or s). 
This C struct or union field was declared to be of type function rather than pointer to function.
Functions as fields are allowed only in C++. 
These fatal errors result from a floating-point operation for which the result is not finite:
  • Divide by 0 means the result is +INF or -INF exactly, such as 1.0/0.0.
  • Domain means the result is NAN (not a number), like 0.0/0.0.
  • Overflow means the result is +INF (infinity) or -INF with complete loss of precision, such as assigning 1e200*1e200 to a double.
 
The floating-point stack has been overrun. This error may be due to assembly code using too many registers or due to a misdeclaration of a floating-point function.
The program prints the error message and calls abort and _exit.
These floating-point errors can be avoided by masking the exception so that it doesn't occur, or by catching the exception with signal. 
These exceptions are masked by default, because underflows are converted to zero and losses of precision are ignored. 
The sum of the global data declarations exceeds 64K bytes. This includes any data stored in the DGROUP (all global variables, literal strings, and static locals).
Solutions
Check the declarations for any array that might be too large. You can also remove variables from the DGROUP.
Here's how:
  • Declare the variables as automatic. This uses stack space.
  • Dynamically allocate memory from the heap using calloc, malloc, or farmalloc for the variables. This requires the use of pointers.
Literal strings are also put in the DGROUP. Get the file farstr.zip from our BBS to extract literal strings into their own segment.... more 
In C++, it is illegal to bypass the initialization of a local variable.
This error indicates a goto statement that can transfer control past this local variable. 
The total size of the segments in a group (for example, DGROUP) exceeded 64K. 
The compiler encountered some invalid character in the input file.
The hexadecimal value of the offending character is printed.
This can also be caused by extra parameters passed to a function macro. 
When a member function of a class is called using a pointer to a derived class, the pointer value must be implicitly converted to point to the appropriate base class.
In this case, such an implicit conversion is illegal. 
You have tried to evaluate or inspect a variable local to a function that is currently not active. (This is an integrated debugger expression evaluation message.) 
The compiler could not find the named file.
Possible Causes
  • The named file does not exist.
  • An #include file included itself.
  • You do not have FILES set in CONFIG.SYS on your root directory.
Solutions
  • Verify that the named file exists.
  • Set FILES = 20 in CONFIG.SYS.
 
References must always be initialized, in the constructor for the class.
A class member of reference type must have an initializer provided in all constructors for that class.
This means you can't depend on the compiler to generate constructors for such a class, because it has no way of knowing how to initialize the references. 
Functions can't become inline after they have already been used.
Either move the inline definition forward in the file or delete it entirely.
The compiler encountered something like:  
The compiler can't handle inline assembly statements in a C++ inline or template function.
You could eliminate the inline assembly code or, in the case of an inline function, make this a macro, and remove the inline storage class. 
An error has occurred in the internal logic of the code generator. Contact CodeGear technical support. 
After the declarator of a template member, either a semicolon, an initialization, or a body was expected, but some other, illegal token was found. This message appears when a template member is declared outside of the template, but the syntax was wrong. 
A namespace identifier was used in an illegal way, for example, in an expression. 
All members of classes declared local to a function must be entirely defined in the class definition.
This means that local classes cannot contain any static data members, and all of their member functions must have bodies defined within the class definition. 
Linkage specifications such as extern "C" are only allowed at the file level.
Move this function declaration out to the file level. 
The compiler cannot create the temporary file TURBOC.$LN because it cannot access the disk or the disk is full. 
Templates cannot be declared inside classes or functions. They are only allowed in the global scope, or file level.
For example:  
The local variables in the current function take up more than 64K. 
Your source file called the named macro with an incorrect number of arguments. 
In a macro definition, arguments must be separated by commas.
The compiler encountered some other character after an argument name.
This is correct:  
An argument in a macro definition must be an identifier.
The compiler encountered some non-identifier character where an argument was expected. 
A macro can't expand to more than 4,096 characters. 
The compiler encountered a floating-point constant with more than one decimal point. 
The compiler encountered more than one exponent in a floating-point constant. 
The compiler encountered more initializers than were allowed by the declaration being initialized. 
A call to a function, via a pointer defined with a prototype, had too many arguments. 
A call to the named function (which was defined with a prototype) had too many arguments given in the call. 
There were more errors or warnings than allowed. 
Individual members of structs, unions, and C++ classes can't have initializers.
A struct or union can be initialized as a whole using initializers inside braces.
A C++ class can only be initialized by the use of a constructor. 
A class that contains constant or reference members (or both) must have at least one user-defined constructor.
Otherwise, there would be no way to ever initialize such members. 
A static data member, enumerator, member of an anonymous union, or nested type cannot have the same name as its class.
Only a member function or a non-static member can have a name that is identical to its class. 
The built-in assembler requires a memory reference.
You probably forgot to put square brackets around an index register operand. 
This means that you have written class::member where 'member' is an ordinary (non-static) member, and there is no class to associate with that member.
For example, it is legal to write this:  
A reference to a member function must be called, or its address must be taken with & operator.
In this case, a member function has been used in an illegal context.
For example:  
The compiler no longer issues this error. 
This identifier was improperly declared more than once.
This might be caused by conflicting declarations such as:
  • int a; double a;
  • a function declared two different ways, or
  • a label repeated in the same function, or
  • some declaration repeated other than an extern function or a simple variable
This can also happen by inadvertently including the same header file twice. For example, given:  
Most C++ operator functions can be members of classes or ordinary non-member functions, but these are required to be members of classes:
  • operator =
  • operator ->
  • operator ( )
  • type conversions
This operator function is not a member function but should be. 
A near pointer cannot be converted to a far pointer in the expression evaluation box when a program is not currently running. This is because the conversion needs the current value of DS in the user program, which doesn't exist. 
When initializing a vector (array) of classes, you must use the constructor that has no arguments.
This is called the default constructor, which means that you can't supply constructor arguments when initializing such a vector. 
The integrated debugger does not support the evaluation of the new and delete operators. 
You have attempted to create a reference using the new operator.
This is illegal, because references are not objects and can't be created through new. 
Your source file contains inline assembly language statements and you are compiling it from within the integrated environment.
You must use the BCC command to compile this source file from the DOS command line. 
This C++ class constructor is trying to implicitly call a base class constructor, but this class was declared with no base classes.
Check your declarations. 
When used to begin a private, protected, or public section of a C++ class, the reserved words "private," "protected," and "public" must be followed by a colon. 
If f is a member function of class c, you take its address with the syntax  
The question mark (?) and colon (:) operators do not match in this expression.
The colon might have been omitted, or parentheses might be improperly nested or missing. 
A comma was expected in a list of declarations, initializations, or parameters.
This problem is often caused by a missing syntax element earlier in the file or one of its included headers. 
A declaration was expected here but not found.
This is usually caused by a missing delimiter such as a comma, semicolon, right parenthesis, or right brace. 
When a C++ function declares a parameter with a default value, all of the following parameters must also have default values.
In this declaration, a parameter with a default value was followed by a parameter without a default value. 
All parameters following the first parameter with a default value must also have defaults specified. 
A 'try' block was found with the exception handling disabled. 
An expression was expected here, but the current symbol can't begin an expression.
This message might occur where the controlling expression of an if or while clause is expected or where a variable is being initialized.
This message is often due to a symbol that is missing or has been added. 
The command line contained no file names. You must specify a source file name. 
The file name in an #include statement was missing the correct closing quote or angle bracket. 
The goto keyword must be followed by an identifier. 
An identifier was expected here, but not found.
In C, an identifier is expected in the following situations:
  • in a list of parameters in an old-style function header
  • after the reserved words struct or union when the braces are not present, and
  • as the name of a member in a structure or union (except for bit fields of width 0).
In C++, an identifier is also expected in these situations:
  • in a list of base classes from which another class is derived, following a double colon (::), and
  • after the reserved word "operator" when no operator symbol is present.
 
A left brace was expected at the start of a block or initialization. 
A left parenthesis was expected before a parameter list. 
The keyword template was not followed by <.
Every template declaration must include the template formal parameters enclosed within < >, immediately following the template keyword. 
The left side of an assignment operator must be an addressable expression.
Addressable expressions include the following:
  • numeric or pointer variables
  • structure field references or indirection through a pointer
  • a subscripted array element
 
Delphi style classes cannot have multiple base classes.
 
The name of a structure or C++ class member was expected here, but not found. The right side of a dot (.) or arrow (->) operator must be the name of a member in the structure or class on the left of the operator. 
When the following occurs
1.A C++ class 'class1' contains a member of class 'class2,'
and
2.You want to construct an object of type 'class1' (but not from another object of type 'class1'). There must be a constructor class2::class2() so that the member can be constructed.
This constructor without parameters is called the default constructor.
The compiler will supply a default constructor automatically unless you have defined any constructor for class 'class2'.
In that case, the compiler will not supply the default constructor automatically ( you must supply one. 
Something other than a class member function has been declared const or volatile
Only virtual functions can be declared pure, because derived classes must be able to override them. 
You attempted to call a member function without providing an object. This is required to call a member function.  
A reference to a non-static class member without an object was encountered.
Such a member can't be used without an object, or its address must be taken with the & operator. 
No C++ function could be found with parameters matching the supplied arguments. Check parameters passed to function or overload function for parameters that are being passed. 
In integrated debugger expression evaluation, resolution of overloaded functions or operators is not supported, not even to take an address. 
In a function definition header, this parameter consisted only of a type specifier 'number' with no parameter name.
This is not legal in C.
(It is allowed in C++, but there's no way to refer to the parameter in the function.) 
Nothing but a pointer is allowed on the left side of the arrow (->) in C or C++.
In C++ a -> operator is allowed. 
This error is generated if any of the following occur:
  • Your source file declared an array in which the array bounds were not terminated by a right bracket.
  • The array specifier in an operator is missing a right bracket.
  • The operator [ ] was declared as operator [.
  • A right bracket is missing from a subscripting expression.
Add the bracket or fix the declaration.
Check for a missing or extra operator or mismatched parentheses. 
A right brace was expected at the end of a block or initialization. 
Your source file declared the current function to return some type other than int or void, but the compiler encountered a return with no value. This usually indicates some sort of error.
Functions declared as returning int are exempt because older versions of C did not support void function return types. 
A right parenthesis was expected at the end of a parameter list. 
The left side of a dot (.) operator (or C++ dot-star operator, .*) must evaluate to a structure type. In this case it did not.
This error can occur when you create an instance of a class using empty parentheses, and then try to access a member of that 'object'. 
A C++ class constructor is trying to call a base class constructor 'constructor.'
This error can also occur if you try to change the access rights of 'class::constructor.'
Check your declarations. 
Arrays must be declared with constant size.
This error is commonly caused by misspelling a #define constant. 
An error has occurred while using the command-line utility H2ASH. See the online file "tsm_util.txt" for further information about this utility. 
The name being called is not declared as a function.
This is commonly caused by incorrectly declaring the function or misspelling the function name. 
This declaration doesn't declare anything.
This may be a struct or union without a tag or a variable in the declaration. C++ requires that something be declared.
For example:  
In C++, "this" is a reserved word that can be used only within class member functions. 
You are trying to reference 'identifier' as a member of 'struct', but it is not a member.
Check your declarations. 
In the parameter declaration section of an old-style function definition, 'identifier' is declared but not listed as a parameter. Either remove the declaration or add 'identifier' as a parameter. 
The right operand of a .*, ->*, or ::operator was not a pointer to a member of a class that is either identical to (or an unambiguous accessible base class of) the left operand's class type. 
The !, ++, and -- operators require an expression of scalar type.
Only these types are allowed:
  • char
  • short
  • int
  • long
  • enum
  • float
  • double
  • long double
  • pointer
 
The integrated debugger has no type information for this variable. Ensure that you've compiled the module with debug information. If it has, the module may have been compiled by another compiler or assembler. 
One of these errors has occurred:
  • In declaring a file-level variable or a struct field, neither a type name nor a storage class was given.
  • In declaring a typedef, no type for the name was supplied.
  • In declaring a destructor for a C++ class, the destructor name was not a type name (it must be the same name as its class).
  • In supplying a C++ base class name, the name was not the name of a class.
 
This C++ object is declared constant or as a reference, but is not initialized.
It must be initialized at the point of declaration. 
When a C++ class 'class1' contains a vector (array) of class 'class2', and you want to construct an object of type 'class1' from another object of type 'class 1', you must use this constructor:  
Delphi style classes cannot be derived virtually, not even from other Delphi style classes.
 
Your source file contained a do statement that was missing the closing while keyword. 
The compiler encountered a decimal point in a hexadecimal number. 
String and character escape sequences larger than hexadecimal or octal 77 can't be generated.
Two-byte character constants can be specified by using a second backslash. For example,  
The name of a namespace symbol was expected. 
Namespace members must be declared inside their namespace. You can only use explicit qualification to define a namespace member (for example, to give a body for a function declared in a namespace). The declaration itself must be inside the namespace. 
The compiler found an octal constant containing a non-octal digit (8 or 9). 
The built-in assembler does not accept this combination of operands.
Possible causes
  • There are too many or too few operands for this assembler opcode.
  • The number of operands is correct, but their types or order do not match the opcode.
 
It is illegal for overloaded operators to have default argument values. 
An overloaded operator was declared with something other than function type.
For example:  
C++ class member functions can be declared only inside the class declaration.
Unlike nonmember functions, they can't be declared multiple times or at other locations. 
The only time an overloaded function name can be used or assigned without actually calling the function is when a variable or parameter of the correct function pointer type is initialized or assigned the address of the overload function.
In this case, an overloaded function name has been used in some other context, for example, the following code will generate this error:  
You cannot overload main. 
A variable or parameter is assigned (or initialized with) the address of an overloaded function.
However, the type of the variable or parameter doesn't match any of the overloaded functions with the specified name. 
C++ functions are by default overloaded, and the compiler assigns a new name to each function.
If you wish to override the compiler's assigning a new name by declaring the function extern "C", you can do this for only one of a set of functions with the same name.
(Otherwise the linker would find more than one global function with the same name.) 
The compiler no longer issues this error. 
The function called, via a function pointer, was declared with a prototype.
However, the given parameter number (counting left to right from 1) could not be converted to the declared parameter type.
When compiling C++ programs, this message is always preceded by another message that explains the exact reason for the type mismatch.
That other message is usually "Cannot convert 'type1' to 'type2'" but the mismatch might be due to many other reasons. 
Your source file declared the named function with a prototype, and the given parameter number (counting left to right from 1) could not be converted to the declared parameter type.
When compiling C++ programs, this message is always preceded by another message that explains the exact reason for the type mismatch.
That other message is usually "Cannot convert 'type1' to 'type2'", but the mismatch might be due to many other reasons. 
Your source file declared the function called via a function pointer with a prototype.
However, the named parameter could not be converted to the declared parameter type.
When compiling C++ programs, this message is always preceded by another message that explains the exact reason for the type mismatch.
That other message is usually "Cannot convert 'type1' to 'type2'" but the mismatch might be due to many other reasons. 
Your source file declared the named function with a prototype, and the named parameter could not be converted to the declared parameter type.
When compiling C++ programs, this message is always preceded by another message that explains the exact reason for the type mismatch.
That other message is usually "Cannot convert 'type1' to 'type2'" but the mismatch might be due to many other reasons. 
A C++ derived class can modify the access rights of a base class member, but only to public or protected.
A base class member can't be made private. 
An implicit conversion between a pointer and an integral type is required, but the types are not the same size. You must use an explicit cast.
This conversion might not make any sense, so be sure this is what you want to do. 
It is illegal to have a pointer to a reference or a reference to a reference. 
Abstract classes (those with pure virtual functions) can't be used directly, only derived from.
When you derive an abstract base class, with the intention to instantiate instances of this derived class, you must override each of the pure virtual functions of the base class exactly as they are declared.
For example:  
The types of the expressions on both sides of the colon in the conditional expression operator (?:) must be the same, except for the usual conversions.
These are some examples of usual conversions
  • char to int
  • float to double
  • void* to a particular pointer
In this expression, the two sides evaluate to different types that are not automatically converted.
This might be an error or you might merely need to cast one side to the type of the other.
When compiling C++ programs, this message is always preceded by another message that explains the exact reason for the type mismatch.... more 
The compiler has detected a recursive template function instance. For example:  
Your source file redeclared a variable with a different type than was originally declared for the variable.
Possible Causes
This can occur if a function is called and subsequently declared to return something other than an integer.
Solutions
If this has happened, you must declare the function before the first call to it. 
A reference variable that is not declared constant must be initialized with an lvalue of the appropriate type.
In this case, the initializer either wasn't an lvalue, or its type didn't match the reference being initialized. 
You provided an initial value for a reference type that was not an lvalue of the referenced type.
This requires the compiler to create a temporary for the initialization.
Because there is no obvious place to store this temporary, the initialization is illegal. 
The built-in assembler detected an illegal combination of registers in an instruction.
These are valid index register combinations:
  • [BX]
  • [BP]
  • [SI]
  • [DI]
  • [BX+SI]
  • [BX+DI]
  • [BP+SI]
  • [BP+DI]
Other index register combinations are not allowed. 
This type specifier occurs more than once in this declaration.
Delete or change one of the occurrences. 
The expression before the comma (,) in the Watch or Evaluate window must be an accessible region of storage. For example, expressions like this one are not valid:  
This C++ function returns a reference type, and you are trying to return a reference to a local (auto) variable.
This is illegal, because the variable referred to disappears when the function exits.
You can return a reference to any static or global variable, or you can change the function to return a value instead. 
You attempted to return a reference to a temporary object in a function that returns a reference type. This may be the result of a constructor or a function call.
This object will disappear when the function returns, making the reference illegal. 
The right side of a C++ dot-star (.*) or an arrow star (->*) operator must be declared as a pointer to a member of the class specified by the left side of the operator.
In this case, the right side is not a member pointer. 
When virtual functions are present, the RTTI attribute of all base classes must match that of the derived class. 
Expressions requiring RTTI are not supported by the expression evaluator in the integrated debugger. This error message is only issued by the expression evaluator (if you try to Inspect, Watch, or Evaluate), not by the compiler. 
sizeof returns the size of a data object in bytes, which does not apply to a bit field. 
sizeof can be applied only to data objects, not functions.
You can request the size of a pointer to a function. 
Only ordinary C++ class data members can be declared static, not bit fields. 
Only ordinary member functions and the operators new and delete can be declared static.
Constructors, destructors and other operators must not be static. 
This error is reported when you compile a function with the Test Stack Overflow option on, but there is not enough stack space to allocate the function's local variables.
This error can also be caused by the following:
  • infinite recursion, or
  • an assembly language procedure that does not maintain the stack project
  • a large array in a function
 
In a do, for, if, switch, or while statement, the compiler found no left parenthesis after the while keyword or test expression. 
In a do, for, if, switch, or while statement, the compiler found no right parenthesis after the while keyword or test expression. 
In a do or for statement, the compiler found no semicolon after the right parenthesis. 
The compiler encountered an expression statement without a semicolon following it. 
The compiler found no terminating quote after the beginning of a string or character constant. 
Your source file declared a structure larger than 64K. 
Side effects such as assignments, ++, or -- are not allowed in the debugger watch window. A common error is to use x = y (not allowed) instead of x == y to test the equality of x and y. 
The selection expression in parentheses in a switch statement must evaluate to an integral type (char, short, int, long, enum).
You might be able to use an explicit cast to satisfy this requirement. 
An ANSI C++ rule requires that a specialization for a function template be declared before its first use. This error message is only issued when the ANSI conformance option (-A) is active. 
Also E2385 Cannot call near class member function 'function' with a pointer of type 'type'
Member functions of near classes can't be called via a member pointer.
This also applies to calls using pointers to members.
(Remember, classes are near by default in the tiny, small, and medium memory models.)
Either change the pointer to be near, or declare the class as far. 
The actual template argument value supplied for the given parameter did not exactly match the formal template parameter type.
When compiling C++ programs, this message is always preceded by another message that explains the exact reason for the type mismatch.
That other message is usually "Cannot convert 'type1' to 'type2'" but the mismatch might be due to many other reasons. 
The actual template argument value supplied for the given parameter did not exactly match the formal template parameter type.
When compiling C++ programs, this message is always preceded by another message that explains the exact reason for the type mismatch.
That other message is usually "Cannot convert 'type1' to 'type2'" but the mismatch might be due to many other reasons. 
A template class name was missing actual values for some of its formal parameters. 
A template class name specified too many actual values for its formal parameters. 
A non-type template class argument must be a constant expression of the appropriate type.
This includes constant integral expressions and addresses of objects or functions with external linkage or members. 
This error indicates that an illegal template argument list was found.
In a template declaration, the keyword template must be followed by a list of formal arguments enclosed within < and > delimiters. 
A nontype formal template argument must have scalar type; it can have an integral, enumeration, or pointer type. 
A function template was declared with a non-type argument.
This is not allowed with a template function, as there is no way to specify the value when calling it. 
A member of a template with some actual arguments that depend on the formal arguments of an enclosing template was found not to be a member of the specified template in a particular instance. 
The declaration in a template declaration must specify either a class type or a function. 
When defining a template class member, the actual arguments in the template class name used as the left operand for the :: operator must match the formal arguments of the template class. 
Because an ellipsis contains three dots (...), and a decimal point or member selection operator uses one dot (.), two consecutive dots cannot legally occur in a C program. 
In a C++ class constructor, the list of initializations following the constructor header includes base class 'class' more than once. 
In a C++ class constructor, the list of initializations following the constructor header includes the same member name more than once. 
This variable has more than one initialization. It is legal to declare a file level variable more than once, but it can have only one initialization (even if two are the same). 
In ANSI C, a function body cannot be defined using a typedef with a function Type.
Redefine the function body. 
You tried to use a linkage specification with a template or overloaded operator. The most common cause for this error message is having the declaration wrapped in an extern "C" linkage specification. 
This declaration is attempting to reference 'ident' as the tag of an enum type, but it has not been so declared.
Correct the name, or rearrange the declarations. 
The named label has a goto in the function, but no label definition. 
This identifier was used in a context where its size was needed.
A struct tag might only be declared (the struct not defined yet), or an extern array might be declared without a size.
It's illegal then to have some references to such an item (like sizeof) or to dereference a pointer to this type.
Rearrange your declaration so that the size of 'identifier' is available. 
The named structure was used in the source file, probably on a pointer to a structure, but had no definition in the source file.
This is probably caused by a misspelled structure name or a missing declaration. 
The named identifier has no declaration.
Possible Causes
  • Actual declaration of identifier has been commented out.
  • Misspelling, either at this point or at the declaration.
  • An error in the declaration of the identifier.
  • The header file in which the identifier is declared was not included using #include
Tools to help track down the problem:
GREP 
This type was used in a context where its size was needed.
For example, a struct tag might only be declared (the struct not defined yet).
It's illegal then to have some references to such an item (like sizeof) or to dereference a pointer to this type.
Rearrange your declarations so that the size of this type is available. 
This error message indicates that an array of unspecified dimension nested within another structure is initialized and the -A (ANSI) switch is on. For example:  
A union can't be used as a base type for another class type. 
In general, a C++ class can be of union type, but such a class can't be derived from any other class. 
A union can't contain members that are of type class with user-defined constructors, destructors, or operator =. 
This message is issued when a global variable that is declared as __thread (a Win32-only feature) or a static data member of a template class is initialized with a non-constant initial value.
This message is also issued when a global variable that is declared as __thread (a Win32-only feature) or a static data member of a template class has the type class with constructor or destructor. 
A data member has been declared with the virtual specifier.
Only member functions can be declared virtual.
For example:  
A union can't have virtual functions as its members. 
A reference always refers to an object, but an object cannot have the type void.
Thus, the type void is not allowed. 
A function with a return type void contains a return statement that returns a value; for example, an int.
Default = displayed 
A value of type void is really not a value at all, so it can't appear in any context where an actual value is required.
Such contexts include the following:
  • the right side of an assignment
  • an argument of a function
  • the controlling expression of an if, for, or while statement.
 
The compiler no longer issues this error. 
The compiler no longer issues this error. 
You tried to call a function that is known to the evaluator, but which was not present in the program being debugged, for example, an inline function. 
A requested function call failed because the function is not available in the program, a parameter cannot be evaluated, and so on. The evaluator issues this message. 
The evaluator issues this message when there is an error in a scope override in an expression you are watching or inspecting. You can specify a symbol table, a compilation unit, a source file name, etc. as the scope of the expression, and the message will appear whenever the compiler cannot access the symbol table, compilation unit, or whatever. 
The syntax of a scope override is somehow incomplete. The evaluator issues this message. 
This is a runtime error. It is generated if the body of a pure virtual function was never generated and somehow the compiler tried to call it. 
This error message is issued by the evaluator when a string literal appears in a context other than a function call. 
If either of these errors occur, it indicates a catastrophic failure of the CodeGear tools. You should contact CodeGear to report the problem and to find a potential work around for your specific case. By isolating the test case as well as possible, you will increase the chance for either CodeGear or yourself to find a work around for the problem.
Commonly, compiler failures can be worked around by moving the source code that is currently being compiled. Simple cases might be switching the order of variable declarations, or functions within the source module. Moving the scope and storage of... more 
In C++, it is illegal to take the address of the main function. 
A virtual function in a virtual base class was overridden with two or more different functions along different paths in the inheritance hierarchy. For example,  
ANSI C and C++ require that an array be defined to have at least one element (objects of zero size are not allowed).
An old programming trick declares an array element of a structure to have zero size, then allocates the space actually needed with malloc.
You can still use this trick, but you must declare the array element to have (at least) one element if you are compiling in strict ANSI mode.
Declarations (as opposed to definitions) of arrays of unknown size are still allowed.
Example  
It is illegal to have an array of references, because pointers to references are not allowed and array names are coerced into pointers. 
A closure pointer variable is used incorrectly. Closure variables have limited usage. For instance, you can assign a function to a closure variable, and execute that function through the closure variable, but you cannot use a closure variable like a pointer variable. 
A declaration has an extra or incorrect termination symbol, such as a semicolon placed after a function body.
A C++ member function declared in a class with a semicolon between the header and the opening left brace also generates this error. 
A macro definition starts or ends with the ## operator, or contains the # operator that is not followed by a macro argument name.
An example of this might be:  
Classes marked as delphireturn are special classes that the compiler needs to recognize by name. These classes are predefined in the headers.
Some of the delphireturn classes are Variant, AnsiString, and Currency.
You cannot mark user-defined classes as delphireturn. 
Some of the modifiers of this dynamic function conflict with the definition of the same function in the base class. The two functions should have the same modifiers. The following modifiers (among others) can cause conflicts:
  • __export
  • __import
  • declspec(naked)
  • declspec(package)
  • __fastcall
 
Function pointer type declarations are not allowed to contain exception specifications. 
An attempt has been made to use one of the exception handling values that are restricted to particular exception handling constructs, such as GetExceptionCode(). 
If you define a function in a namespace, which has a name that might be replaced by a call to an intrinsic when -Oi is on, it is not permitted to have a "using" declaration which refers to that member.
For example, calls to "strcmp" are replaced by the intrinsic "__strcmp__" when -Oi is on. This means that the declaration "using N::strcmp;" would become "using N::__strcmp__", since the token replacement happens before the compiler's parser ever sees the tokens.
An error displays in this case, because the compiler doesn't know how to process "N::__strcmp__". 
In C++, function main has special requirements, one of which is that it cannot be declared with any return type other than int. 
The #pragma option pop can only be followed by comments, blanks, or end of line. 
A function was defined to return an array or a function. Check to see if either the intended return was a pointer to an array or function (and perhaps the * is missing) or if the function definition contained a request for an incorrect datatype. 
The operator you are calling is not defined in this class. When you have an expression: x + x, where x is of type class X, the operator + has to be defined in class X and be accessible. 
The operator you are calling is not defined in this class. When you have an expression: x + x, where x is of type class X, the operator + has to be defined in class X and be accessible. 
The explicit instantiation operator "template" can only be used within global or namespace scope. It cannot be used to qualify a local class or a class member, for example. 
When specializing a function, such as providing the definition for "foo<int>", so that foo behaves specially which called for the "int" argument, now requires that the declaration begin with an explicit specialization operator. 
The explicit specialization operator template<> can only be used within global or namespace scope. It cannot be used to qualify a local class or a class member, for example. 
The 'export' keyword can only occur before the keyword "template" ina template declaration. It cannot be used anywhere else. 
The explicit instantiation operator "template" can only be used to refer to templates. It cannot be used with non-templates. 
The explicit specialization operator template<> can only be used in front of a template class or function. Using it with a normal class means nothing, and hence generates an error. 
You cannot use this name as a unit directive. Instead use one of the following unit directives: weak, smart_init, or deny. 
In C++, bit fields must have an integral type. This includes enumerations. 
C++ does not allow recursive calls of main( ). 
Sometimes the compiler is required to generate a member function for the user.
Whenever such a member function can't be generated due to applicable language rules, the compiler issues one of these error messages. 
Indicates that a property definition relies directly or indirectly on itself.
 
Ordinary C structures can be initialized with a set of values inside braces.
C++ classes can only be initialized with constructors if the class has constructors, private members, functions, or base classes that are virtual. 
When a parameter of a C++ function is declared to have a default value, this value can't be changed, redeclared, or omitted in any other declaration for the same function. 
When a parameter of a C++ function is declared to have a default value, this value can't be changed, redeclared, or omitted in any other declaration for the same function. 
The default parameter value given could not be converted to the type of the parameter.
The message "Type mismatch in default argument value" is used when the parameter was not given a name.
When compiling C++ programs, this message is always preceded by another message that explains the exact reason for the type mismatch.
That other message is usually "Cannot convert 'type1' to 'type2'" but the mismatch might be due to many other reasons. 
If a person uses the 'delete' operator on an object (note: not a pointer to an object, but an object itself), the standard requires that object to define exactly one "conversion to pointer operator" which will yield the pointer that gets freed. For example:  
It is not legal to specify two handlers for the same type. 
In a list of catch handlers, if the specified handler is present, it must be the last handler in the list (that is, it cannot be followed by any more catch handlers). 
You can have multiple #pragma package statements in a source file as long as they have the same arguments. This error occurs if the compiler encounters more than one #pragma package with different arguments in each. 
The compiler must truncate mangled names to a certain length because of a name length limit that is imposed by the linker. This truncation may (in very rare cases) cause two names to mangle to the same linker name. If these names happen to both be VIRDEF names, the compiler issues this error message. The simplest workaround for this problem is to change the name of 'function' so that the conflict is avoided. 
Dispids must be unique and the compiler checks for this.
 
When you declare a function dynamic, you cannot override this function in a derived class with a virtual function of the same name and type. Similarly when the function is declared virtual, you cannot override it with a dynamic one in a derived class. 
It is not legal to jump into a try block, or an exception handler that is attached to a try block. 
Only certain types are allowed in __automated sections.
 
The stored, default, and nodefault storage specifiers are only allowed within property declarations of Delphi style class types.
 
You are trying to reference C++ class member 'member,' but it is private or protected and can't be referenced from this function.
This sometimes happens when you attempt to call one accessible overloaded member function (or constructor), but the arguments match an inaccessible function.
The check for overload resolution is always made before checking for accessibility.
If this is the problem, try an explicit cast of one or more parameters to select the desired accessible function.
Virtual base class constructors must be accessible within the scope of the most derived class. This is because C++ always constructs virtual base classes... more 
When declaring an array of a class that has constructors, you must either explicitly initialize every element of the array, or the class must have a default constructor.
The compiler will define a default constructor for a class unless you have defined any constructors for the class. 
Whenever a C++ derived class 'class2' is constructed, each base class 'class1' must first be constructed.
If the constructor for 'class2' does not specify a constructor for 'class1' (as part of 'class2's' header), there must be a constructor class1::class1() for the base class.
This constructor without parameters is called the default constructor.
The compiler will supply a default constructor automatically unless you have defined any constructor for class 'class1'.
In that case, the compiler will not supply the default constructor automatically--you must supply one.  
In a C++ program, a 'try' block must be followed by at least one 'catch' block. 
The calling convention is in the wrong place in the closure declaration. For example,  
This property needs either a getter or a setter. 
In C, a '__try block' must be followed by a '__except' or '__finally' handler block. 
A new-style cast (for example, dynamic_cast) was found with a missing closing ">". 
You cannot make main static or inline. For example, you cannot use static int main() or inline int main(). 
To use Identifier1, there needs to be a definition for Identifier2, which is a type.
Example where __classid is the first identifier and TClass, which can be found in clx.h, is the second one:  
The compiler needs to generate a special kind of vtable for classes containing __published and __automated sections. Therefore, these sections are only supported for Delphi style classes.
 
A call to a template function was found, but a matching template function cannot be generated from the function template. 
When declaring a closure type, the arguments passed to that closure must be of a simple type. Templates are not accepted. To pass a reference to an object of template type to a closure, you must declare a typedef, which counts as a simple type name.
 
A dynamic_cast was used with a pointer to a class type that is either undefined, or doesn't have any virtual member functions. 
The member is being referenced while the class has not been fully defined yet. This can happen if you forward declare class X, declare a pointer variable to X, and reference a member through that pointer; for example:  
This error is generated if the -RT compiler option (for runtime type information) is disabled and either
dynamic_cast was used with a pointer to a class
or
you tried to delete a pointer to an object of a class that has a virtual destructor 
A numeric literal is followed by a suffix that is not recognized by the compiler.
 
When you want to use several __declspec modifiers, the compiler will complain if you don't combine them into one __declspec. For example:  
This error occurs if you attempt to use the default assignment operator. For example, the following code generates this error given two labels on a form:  
You have interspersed too many source-code option changes (using #pragma option) between template declarations. For example:  
You have tried to inspect, watch, or otherwise access a variable which the optimizer removed.
This variable is never assigned a value and has no stack location. 
You cannot overload the specified function. This error is displayed if you tried to declare a function with the same name as another function, but the redeclaration is not legal. For example, if both functions have the 'extern "C"' linkage type, only one 'extern "C"' function can have a given name. 
Only member functions or data members are allowed in access specifications of properties.
 
The parameters of the member function used to access a property don't match the expected parameters.
 
Array properties cannot have a storage specification.
 
Only nonstatic data members and member functions are allowed in __published or __automated sections.
 
This message is issued immediately after the "Cannot create instance of abstract class 'classname' error message and is intended to make it easier to figure out why a particular class is considered abstract by the compiler.
For example, consider the following example of an illegal attempt to instantiate an abstract class:  
An attempt has been made to bind a reference member to a constructor parameter. Since the parameter will cease to exist the moment the constructor returns to its caller, this will not work correctly. 
The result of a property assignment is an lvalue. This implies for instance that chained assignments of properties is not allowed; for example, x = y = 5, where both x and y are properties. Certain embedded assignments of properties can also produce errors; for example, x != ( y = z ), where y is a property. 
To ensure interoperability between Delphi and C++, there are restrictions on the type names mentioned in the parameter lists of published closure types. The parameter types have to be simple type names with optional const modifier and pointer or reference notation.
So when declaring a closure type, the arguments passed to that closure must be of a simple type. For example, templates are not accepted. To pass a reference to an object of template type to a closure, you must declare a typedef, which counts as a simple type name.
 
The given argument was not used in the argument list of the function.
The argument list of a template function must use all of the template formal arguments; otherwise, there is no way to generate a template function instance based on actual argument types. 
An error occurred during the instantiation of a particular template. This message always follows some other error message that indicates what actually went wrong. This message is displayed to help track down which template instantiation introduced the problem. 
The compiler imposes a certain limit on the level of template class nesting. This limit is usually only exceeded through a recursive template class dependency.
When this nesting limit is exceeded, the compiler issues this error message for all of the nested template classes. This usually makes it easy to spot the recursion.
This error message is always followed by the fatal error "Out of memory". 
You can only catch a Delphi style object by pointer.
 
You cannot derive a Delphi style class from a non-Delphi style class.
 
Delphi style classes cannot be statically defined. They have to be constructed on the heap.
 
If you are using Delphi style classes in your program, you cannot turn off exception handling (compiler option -x-) when compiling your source code. 
You can't create a pointer to a C++ member of a virtual base class.
You have attempted to create such a pointer (either directly, or through a cast) and access an inaccessible member of one of your base classes. 
When a small or medium memory model program exits, a check is made to determine if the contents of the first few bytes within the program's data segment have changed. These bytes would never be altered by a working program. If they have been changed, this message is displayed to inform you that (most likely) a value was stored to an uninitialized pointer.
The program might appear to work properly in all other respects; however, this is a serious bug which should be attended to immediately. Failure to correct an uninitialized pointer can lead to unpredictable behavior (including locking the... more 
Your source file declared the current function to return some type other than void in C++ (or int in C), but the compiler encountered a return with no value. All int functions are exempt in C because in old versions of C, there was no void type to indicate functions that return nothing. 
The assembler ran out of memory during compilation. Review the portion of code flagged by the error message to ensure that it uses memory correctly. 
You're trying to initialize an enum variable to a different type. For example,  
The identifier name is invalid. Ensure that the first character is a letter or an underscore (_). The characters that follow must be letters, digits, or underscores, and there can not be any spaces in the identifier. 
In this example, function f requires a reference to an int, and c is a char:  
The application you tried to run is already running.
For Windows, make sure the message loop of the program has properly terminated.  
Floating-point formats contain formatting information that is used to manipulate floating-point numbers in certain runtime library functions, such as scanf() and atof(). Typically, you should avoid linking the floating-point formats (which take up about 1K) unless they are required by your application. However, you must explicitly link the floating-point formats for programs that manipulate fields in a limited and specific way.
Refer to the following list of potential causes (listed from most common to least common) to determine how to resolve this error:
  • CAUSE: Floating point set to None. You set the floating-point option to None when it should... more 
(Command-line option to display warning: -wamb)
This warning is displayed whenever two shift, relational, or bitwise-Boolean operators are used together without parentheses.
Also, an addition or subtraction operator that appears without parentheses with a shift operator will produce this warning. 
(Command-line option to suppress warning: -w-pia)
This warning is generated when the compiler encounters an assignment operator as the main operator of a conditional expression (part of an if, while, or do-while statement).
This is usually a typographical error for the equality operator.
If you want to suppress this warning, enclose the assignment in parentheses and compare the whole thing to zero explicitly.
For example, this code  
(Command-line option to suppress warning: -w-asc)
The compiler encountered an asm with no accompanying or #pragma inline statement.
The compile restarts using assembly language capabilities.
Default = On 
(Command-line option to suppress warning: -w-asm)
The compiler encountered an inline assembly statement with a disallowed opcode or an unknown token. Check the spelling of the opcode or token.
Note:You will get a separate error message from the assembler if you entered illegal assembler source code.
This warning is off by default. 
(Command-line option to suppress warning: -w-obi)
Early versions of C++ provided for initialization of a base class by following the constructor header with just the base class constructor parameter list.
It is now recommended to include the base class name.
This makes the code much clearer, and is required when you have multiple base classes.
Old way  
(Command-line option to display warning: -wbbf)
In ANSI C, bit fields may not be of type signed char or unsigned char.
When you're not compiling in strict ANSI mode, the compiler allows these constructs, but flags them with this warning. 
(Command-line option to suppress warning: -w-pro)
This message is given if the "Prototypes required" warning is enabled and you call a function without first giving a prototype for that function. 
This message is given if the "Prototypes required" warning is enabled and you call function 'function' without first giving a prototype for that function. 
(Command-line option to display warning: -wcln)
The compiler encountered one of the following:
  • a decimal constant greater than 32,767 or
  • an octal, hexadecimal, or decimal constant greater than 65,535 without a letter l or L following it
The constant is treated as a long. 
(Command-line option to suppress warning: -w-ccc)
Whenever the compiler encounters a constant comparison that (due to the nature of the value being compared) is always true or false, it issues this warning and evaluates the condition at compile time.
For example:  
(Command-line option to suppress warning: -w-csu)
Since the ranges of signed and unsigned types are different the result of an ordered comparison of an unsigned and a signed value might have an unexpected result.
 
(Command-line option to suppress warning: -w-com)
This warning message is issued when a C++ // comment is continued onto the next line with backslash line continuation.
The intention is to warn about cases where lines containing source code unintentionally become part of a comment because that comment happened to end in a backslash.
If you get this warning, check carefully whether you intend the line after the // comment to be part of the comment. If you don't, either remove the backslash or put some other character after it. If you do, it's probably better coding style to start the... more 
(Command-line option to display warning: -wuse)
The specified identifier was never used. This message can occur in the case of either local or static variables. It occurs when the source file declares the named local or static variable as part of the block just ending, but the variable was never used.
In the case of local variables, this warning occurs when the compiler encounters the closing brace of the compound statement or function. In the case of static variables, this warning occurs when the compiler encounters the end of the source file.
For example:  
(Command-line option to suppress warning: -w-dig)
An error has occurred while using the command-line utility H2ASH. See the online file "tsm_util.txt" for further information about this utility.
Default = On 
(Command-line option to suppress warning: -w-rng)
Your source file includes a comparison involving a constant sub-expression that was outside the range allowed by the other sub-expression's type.
For example, comparing an unsigned quantity to -1 makes no sense.
To get an unsigned constant greater than 32,767 (in decimal), you should either
  • cast the constant to unsigned--for example, (unsigned) 65535, or
  • append a letter u or U to the constant--for example, 65535u.
Whenever this message is issued, the compiler still generates code to do the comparison.
If this code ends up always giving the same result (such as comparing a char... more 
(Command-line option to suppress warning: -w-dsz)
The C++ IDE issues this warning when you've specified the array size when deleting an array.
With the new C++ specification, you don't need to make this specification. The compiler ignores this construct.
This warning lets older code compile. 
(Command-line option to suppress warning: -w-zdi)
A divide or remainder expression had a literal zero as a divisor. 
(Command-line option to suppress warning: -w-eas)
Assigning an integer value to an enum type.
This is an error in C++, but is reduced to a warning to give existing programs a chance to work. 
(Command-line option to suppress warning: -w-bei)
You're trying to initialize an enum variable to a different type.
For example, the following initialization will result in this warning, because 2 is of type int, not type enum count:  
(Command-line option to display warning: -wamp)
An address-of operator (&) is not needed with function name; any such operators are discarded. 
(Command-line option to suppress warning: -w-ext)
This identifier appeared in a declaration that implicitly or explicitly marked it as global or external, and also in a static declaration.
The identifier is taken as static.
You should review all declarations for this identifier. 
(Command-line option to suppress warning = -w-big)
Under older versions of C, a hexadecimal escape sequence could contain no more than three digits.
The ANSI standard allows any number of digits to appear as long as the value fits in a byte.
This warning results when you have a long hexadecimal escape sequence with many leading zero digits (such as \x00045).
Older versions of C would interpret such a string differently. 
(Command-line option to suppress warning: -w-ibc)
A class inherits from the same base class both directly and indirectly. It is best to avoid this non-portable construct in your program code. 
(Command-line option to suppress warning: -w-hid)
A virtual function in a base class is usually overridden by a declaration in a derived class.
In this case, a declaration with the same name but different argument types makes the virtual functions inaccessible to further derived classes. 
(Command-line option to suppress warning: -w-ias)
When you use set the Far Data Threshold option, the compiler automatically makes any global variables that are larger than the threshold size be far.
When the variable is an initialized array with an unspecified size, its total size is not known when the compiler must decide whether to make it near or far, so the compiler makes it near.
The compiler issues this warning if the number of initializers given for the array causes the total variable size to exceed the data size threshold.
If the fact that the compiler made the variable... more 
(Command-line option to display warning: -wpin)
When structures are initialized, braces can be used to mark the initialization of each member of the structure. If a member itself is an array or structure, nested pairs of braces can be used. This ensures that the compiler's idea and your idea of what value goes with which member are the same. When some of the optional braces are omitted, the compiler issues this warning. 
(Command-line option to suppress warning: -w-nci)
This C++ class contains a constant member 'member' that doesn't have an initialization.
Note that constant members can be initialized only; they can't be assigned to. 
(Command-line option to display warning: -wsig)
For an assignment operator or some other circumstance, your source file requires a conversion from a larger integral data type to a smaller integral data type where the conversion exists.
Because the integral data type variables don't have the same size, this kind of conversion might alter the behavior of a program. 
(Command-line option to suppress warning: -w-nma)
An error has occurred while using the command-line utility H2ASH. See the online file "tsm_util.txt" for further information about this utility. 
(Command-line option to suppress warning: -w-dup)
Your source file redefined the macro 'ident' using text that was not exactly the same as the first definition of the macro.
The new text replaces the old. 
(Command-line option to display warning: -wucp)
You converted a signed char pointer to an unsigned char pointer, or vice versa, without using an explicit cast. (Strictly speaking, this is incorrect, but it is often harmless.) 
(Command-line option to suppress warning: -w-ret)
The current function has return statements with and without values.
This is legal C, but almost always generates an error.
Possibly a return statement was omitted from the end of the function. 
(Command-line option to suppress warning: -w-nst)
In previous versions of the C++ specification, typedef and tag names declared inside classes were directly visible in the global scope.
In the latest specification of C++, these names must be prefixed with class::qualifier if they are to be used outside of their class scope.
The compiler issues this warning whenever a name is uniquely defined in a single class. The compiler permits this usage without class::. This allows older versions of code to compile. 
(Command-line option to suppress warning: -w-ncl)
An error has occurred while using the command-line utility H2ASH. See the online file "tsm_util.txt" for further information about this utility. 
(Command-line option to suppress warning: -w-nfd)
An error has occurred while using the command-line utility H2ASH. See the online file "tsm_util.txt" for further information about this utility. 
(Command-line option to suppress warning: -w-nin)
An error has occurred while using the command-line utility H2ASH. See the online file "tsm_util.txt" for further information about this utility. 
(Command-line option to suppress warning: -w-nmu)
An error has occurred while using the command-line utility H2ASH. See the online file "tsm_util.txt" for further information about this utility. 
(Command-line option to suppress warning = -w-ncf)
A non-const member function was called for a const object.
(This is an error, but was reduced to a warning to give existing programs a chance to work.) 
(Command-line option to suppress warning: -w-nvf)
In C++, a class member function was called for a volatile object of the class type, but the function was not declared with volatile following the function header. Only a volatile member function can be called for a volatile object.
For example, if you have  
(Command-line option to suppress warning: -w-eff)
This warning is issued when the compiler encounters a statement with some operators that have no effect.
For example, the statement  
(Command-line option to suppress warning: -w-par)
The named parameter, declared in the function, was never used in the body of the function.
This might or might not be an error and is often caused by misspelling the parameter.
This warning can also occur if the identifier is redeclared as an automatic (local) variable in the body of the function.
The parameter is masked by the automatic variable and remains unused. 
(Command-line option to suppress warning: -w-rvl)
This function was declared (maybe implicitly) to return a value.
The compiler found a return statement without a return value, or it reached the end of the function without finding a return statement.
Either return a value or change the function declaration to return void. 
(Command-line option to suppress warning: -w-nsf)
An error has occurred while using the command-line utility H2ASH. See the online file "tsm_util.txt" for further information about this utility. 
(Command-line option to suppress warning: -w-ngu)
Basically, it makes no sense to negate an unsigned value because the result will still be unsigned.
 
(Command-line option to suppress warning = -w-ofp)
In C++, this old C style of function definition is illegal:  
(Command-line option to suppress warning: -w-ill)
A pragma does not match one of the pragmas expected by the compiler. 
(Command-line option to suppress warning: -w-pre)
The C++ specification allows you to overload both the prefix and postfix versions of the ++ and -- operators.
Whenever the prefix operator is overloaded, but is used in a postfix context, the compiler uses the prefix operator and issues this warning.
This allows older code to compile. 
(Command-line option to suppress warning: -w-dpu)
When a function prototype refers to a structure type that has not previously been declared, the declaration inside the prototype is not the same as a declaration outside the prototype.
For example,  
(Command-line option to suppress warning: -w-rpt)
A nonzero integral value is used in a context where a pointer is needed or where an integral value is needed; the sizes of the integral type and pointer are the same.
Use an explicit cast if this is what you really meant to do. 
(Command-line option to suppress warning: -w-rch)
A break, continue, goto, or return statement was not followed by a label or the end of a loop or function.
The compiler checks while, do, and for loops with a constant test condition, and attempts to recognize loops that can't fall through. 
(Command-line option to suppress warning: -w-lvc)
In C++, a variable or parameter of reference type must be assigned a reference to an object of the same type. If the types do not match, the actual value is assigned to a temporary of the correct type, and the address of the temporary is assigned to the reference variable or parameter.
The warning means that the reference variable or parameter does not refer to what you expect, but to a temporary variable, otherwise unused.
In the following example, function f requires a reference to an int, and c is a char:  
(Command-line option to suppress warning: -w-lvc)
In C++, a variable or parameter of reference type must be assigned a reference to an object of the same type.
If the types do not match, the actual value is assigned to a temporary of the correct type, and the address of the temporary is assigned to the reference variable or parameter.
The warning means that the reference variable or parameter does not refer to what you expect, but to a temporary variable, otherwise unused. 
(Command-line option to suppress warning: -w-lvc)
In C++, a variable or parameter of reference type must be assigned a reference to an object of the same type. If the types do not match, the actual value is assigned to a temporary of the correct type, and the address of the temporary is assigned to the reference variable or parameter.
The warning means that the reference variable or parameter does not refer to what you expect, but to a temporary variable, otherwise unused.
In the following example, function f requires a reference to an int, and c is a char:  
(Command-line option to suppress warning: -w-lin)
In C++, a variable or parameter of reference type must be assigned a reference to an object of the same type.
If the types do not match, the actual value is assigned to a temporary of the correct type, and the address of the temporary is assigned to the reference variable or parameter.
The warning means that the reference variable or parameter does not refer to what you expect, but to a temporary variable, otherwise unused.
Example
In this example, function f requires a reference to an int, and c is a char:  
(Command-line option to display warning: -wstv)
This warning is generated any time a structure is passed by value as an argument.
It is a frequent programming mistake to leave an address-of operator (&) off a structure when passing it as an argument.
Because structures can be passed by value, this omission is acceptable.
This warning provides a way for the compiler to warn you of this mistake. 
(Command-line option to suppress warning: -w-cpt)
Your source file compared a pointer to a non-pointer other than the constant 0.
You should use a cast to suppress this warning if the comparison is proper. 
(Command-line option to suppress warning: -w-sus)
The compiler encountered some conversion of a pointer that caused the pointer to point to a different type.
You should use a cast to suppress this warning if the conversion is proper.
A common cause of this warning is when the C compiler converts a function pointer of one type to another (the C++ compiler generates an error when asked to do that). It can be suppressed by doing a typecast. Here is a common occurrence of it for Windows programmers:  
(Command-line option to suppress warning: -w-pck)
This warning message is issued when the structure alignment is different after including a file than it was before including that file.
The intention is to warn you about cases where an include file changes structure packing, but by mistake doesn't restore the original setting at the end. If this is intentional, you can give a #pragma nopackwarning directive at the end of an include file to disable the warning for this file.
The warning can be disabled altogether by #pragma warn -pck. 
(Command-line option to display warning: -wnod)
This message is given if you call a function without first declaring that function.
In C, you can declare a function without presenting a prototype, as in  
(Command-line option to display warning = -wstu)
Your source file used the named structure on some line before where the error is indicated (probably on a pointer to a structure) but had no definition for the structure.
This is probably caused by a misspelled structure name or a missing declaration. 
(Command-line option to display warning: -wdef)
Your source file used the variable 'identifier' in an expression before it was assigned a value.
The compiler uses a simple scan of the program to determine this condition.
If the use of a variable occurs physically before any assignment, this warning will be generated.
Of course, the actual flow of the program can assign the value before the program uses it. 
(Command-line option to suppress warning: -w-aus)
The variable appears in an assignment, but is never used anywhere else in the function just ending.
The warning is indicated only when the compiler encounters the closing brace.
The #pragma warn -aus switch has function-level granularity. You cannot turn off this warning for individual variables within a function; it is either off or on for the whole function. 
(Command-line option to suppress warning: -w-voi)
Your source file declared the current function as returning void, but the compiler encountered a return statement with a value. The value of the return statement will be ignored.
 
(Command-line option to suppress warning: -w-thr)
This warning happens when you add an exception specification to a function definition and you throw a type in your function body that is not mentioned in your exception specification.
The following program would generate this warning:  
(Command-line option to suppress warning: -w-hch)
This warning is issued when a handler for a type 'D' that is derived from type 'B' is specified after a handler for B', since the handler for 'D' will never be invoked. 
The compiler detected an overflow condition in an integer math expression.
For example:  
The error message for which you have requested Help is a user-defined warning.
In C++ code, user-defined messages are introduced by using the #pragma message compiler syntax.
Note:In addition to messages that you introduce with the #pragma message compiler syntax, user-defined warnings can be introduced by third party libraries. Should you require Help about a third party warning, please contact the vendor of the header file that issued the warning. 
(Command-line option to suppress warning: -w-ntd)
Whitespace is required to separate the closing ">" in a nested template name, but since it is an extremely common mistake to leave out the space, the compiler accepts a ">>" with this warning. 
Also:Functions taking class by value arguments are not expanded inline
(Command-line option to suppress warning: -w-inl)
Exception specifications are not expanded inline: Check your inline code for lines containing exception specification.
Functions taking class-by-value argument(s) are not expanded inline: When exception handling is enabled, functions that take class arguments by value cannot be expanded inline.
Note:Functions taking class parameters by reference are not subject to this restriction. 
(Command-line option to suppress warning: -w-pch)
This warning is issued when pre-compiled headers are enabled but the compiler could not generate one, for one of the following reasons:
ReasonExplanation
write failedThe compiler could not write to the pre-compiled header file. This occurs if you specified an invalid location to cache precompiled headers or if the disk is full.
code in headerOne of the headers contained a non-inline function body.
initialized data in headerOne of the headers contained a global variable definition (in C, a global variable with an initializer; in C++ any variable not declared as 'extern').
header incompleteThe... more 
The compiler encountered a #pragma option pop before a previous #pragma option push, or in the case of nesting, there are more occurrences of #pragma option pop than of #pragma option push. 
(Command-line option to suppress warning: -w-nto)
A precompiled header file references a type object file, but the type object file cannot be found. This is not a fatal problem but will make your object files larger than necessary. 
(Command-line option to suppress warning: -w-inl)
Where:
'statement' can be any of the following:
  • Static variables
  • Aggregate initializers
  • Some return statements
  • Local destructors
  • Some if statements
  • Local classes
  • Missing return statements
  • Disallowed reserved words listed under "Reserved words" below.
Reserved words
Functions containing any of these reserved words can't be expanded inline, even when specified as inline:  
(Command-line option to display warning: -wnak)
A non-ANSI keyword (such as '__fastcall') was used when strict ANSI conformance was requested via the -A option. 
(Command-line option to suppress warning: -w-obs)
Issues a warning upon usage for any "C" linkage function that has been specified. This will warn about functions that are "obsolete".
Here's an example of it's usage:  
(Command-line option to display warning: -wstv)
In looking up include files, the C++ compiler has encountered a file whose path and filename contain more characters than are allowed in the Windows maximum. Rename the paths and filenames that you can, and shorten their names wherever possible. 
The compiler didn't encounter a #pragma option pop after a previous #pragma option push, or in the case of nesting, there are more occurrences of #pragma option push than of #pragma option pop. 
The compiler detects cases where the number of bits shifted over is larger than the number of bits in the affected variable; for example:  
This message indicates an unintended side effect to the pointer arithmetic (or array indexing) found in an expression.
 
(Command-line option to suppress warning: -w-mpc)
This warning is issued only if the -Vv option is in use.
The warning may be issued when a member pointer to one type is cast to a member pointer of another type and the class of the converted member pointer has virtual bases.
Encountering this warning means that at runtime, if the member pointer conversion cannot be completed, the result of the cast will be a NULL member pointer. 
(Command-line option to suppress warning: -w-mpd)
When a member pointer type is declared, its class has not been fully defined, and the -Vmd option has been used, the compiler has to use the most general (and the least efficient) representation for that member pointer type. This can cause less efficient code to be generated (and make the member pointer type unnecessarily large), and can also cause problems with separate compilation; see the -Vm compiler switch for details. 
This class is an abstract class, which you cannot instantiate. 
It is not legal to catch a class that contains more than one copy of a (non-virtual) base class. However, you can catch the exception as a more derived type. For example:  
In an argument list, the variadic template must not be followed by arguments. 
See Static Assertions for details about how to use static_assert., which is one of the C++0x features. 
This message pertains to the expected syntax of variadic templates. 
Eliminate the combination of options.
For example, you cannot combine the C++ compiler options -b- and -bi because -b- turns off all -b options, including -bi. 
A parameter pack is required in the indicated location. This message pertains to variadic templates. 
The throw specifications on two function declaration/definitions which refer to the same function do not agree. Rewrite the function exception specifications to match. 
This error occurs when an incomplete type is used in exception declaration. From C++ ISO 14882:1998 15.3.1: "The exception-declaration shall not denote an incomplete type. The exception-declaration shall not denote a pointer or reference to an incomplete type, other than void*, const void*, volatile void*, or const volatile void*. Types shall not be defined in an exception-declaration. 
This error occurs when an incomplete type is used in a throw specification. From C++ ISO 14882:1998 15.1.3: "The type of the throw-expression shall not be an incomplete type, or a pointer or reference to an incomplete type, other than void*, const void*, volatile void*, or const volatile void*." This includes exception specifications (15.4.1). 
If the type is const then either an initializer must be present or the non-POD class must have a user-declared constructor. Error in ANSI mode, warning if ANSI mode is not set.
 
This error occurs if the specified attribute cannot be applied to this entity. 
Ensure that the underlying type of the enumeration is an integral type.
The underlying type of a scoped enum is fixed to int unless explicitly provided by the user. The underlying type of a 'classic' enum remains unspecified unless fixed by the user.
For more information, see Strongly Typed Enums
This error occurs if:
  • a re-declaration of an enum has a different underlying type
  • a scoped enum is re-declared as an unscoped enum
  • an unscoped enum is re-declared as a scoped enum

For more information, see Strongly Typed Enums
This error occurs when a parameter passed to a type trait function is not the correct type. 
Integral constant expressions are described in section 5.19 of the C++ standard, and are sometimes referred to as "compile time constants". A working draft for the C++ standard can be found at http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2588.pdf
This error occurs when an incomplete type is passed into a type trait function that does not accept incomplete type parameters. For example:  
You need to supply a constant expression in the indicated location.
For details about using a constant expression in a static assertion, see Static Assertions
An ellipsis (...) is expected in the location indicated. 
You need to specify a string literal in the position indicated in the error message.
A string literal is the second argument in a static assertion. For details about using a static assertion, see Static Assertions
Support might be added in a coming release. 
The attribute 'final' applies to class definitions and to virtual member functions being declared in a class definition. If the attribute is specified for a class definition, it is equivalent to being specified for each virtual member function of that class, including inherited member functions. If a virtual member function f in some class B is marked 'final' and in a class D derived from B, a function D::f overrides B::f, the program is ill-formed. 
Attributes specified on a declaration have to be a subset of attributes specified on a definition. 
Rewrite the __finally block so that it does not contain a return statement.
For more information, see Writing a finally Block in C++ and finally keyword
(Command-line option to suppress warning: -w-mls)
This warning is generated for local static objects with constructors for multithreaded programs. This situation can cause problems if two threads enter the containing function at the same time and no critical sections are present, allowing the constructor to potentially be called more than once. 
You have used an old style syntax or language use that is deprecated -- that is, no longer recommended and might be phased out in the future. 
(Command-line option to suppress warning: -w-dat)
This warning is generated if the same attribute was specified more than once for the same entity. 
(Command-line option to suppress warning: -w-nci)
If the type is const then either an initializer must be present or the non-POD class must have a user-declared constructor. Error in ANSI mode, warning if ANSI mode is not set.
 
(Command-line option to suppress warning: -w-iex)
'extern template' has no normative effect on inline functions. Implementations are encouraged to suppress out-of-line copies of inline functions that were declared with 'extern template'. 
(Command-line option to enable warning: -wpad)
This warning is generated if a parameter of an intrinsic function is a dependent type and the dependency cannot be resolved. 
(Command-line option to suppress warning: -w-mnc)
This warning is generated for a reference or constant member in a class without constructors if ANSI mode is not set. In ANSI mode this is an error. 
(Command-line option to enable warning: -wntn)
This warning is generated if the type of a class/union member is omitted in its declaration and ANSI mode is not set. Always an error in ANSI mode. 
(Command-line option to suppress warning: -w-dex)
This warning is generated if dependencies in the expression cannot be resolved. 
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!