Programming Search⌘K

C++ errors and diagnostics, page 4 of 7

The error codes and warnings of C++, with the message that each one prints and what causes it. This page has 1,208 cards.

Floating-point comparison is always. -Wliteral-range

Clang enables it by default. Clang has 5 messages for this flag.

Code
-Wliteral-range
Severity
warning
Message
floating-point comparison is always
Message
true
Message
false
Message
magnitude of floating-point constant too large for type {}; maximum is {}
Message
magnitude of floating-point constant too small for type {}; minimum is {}

Source: clang.llvm.org. JSON record. This entry is a card. Help write this page.

‘main’ should not be ‘extern “C”’. -Wmain

Clang enables some of the diagnostics that it controls by default. Clang has 8 messages for this flag.

Code
-Wmain
Severity
warning
Message
‘main’ should not be ‘extern “C”’
Message
referring to ‘main’ within an expression is a Clang extension
Message
‘main’ is not allowed to be declared _Noreturn
Message
‘main’ is not allowed to be declared variadic
Message
only one parameter on ‘main’ declaration
Message
variable named ‘main’ with external linkage has undefined behavior
Message
bool literal returned from ‘main’
Message
‘main’ should not be declared static

Source: clang.llvm.org. JSON record. This entry is a card. Help write this page.

A group of warnings. -Wmicrosoft

Clang enables some of the diagnostics that it controls by default. It also controls -Winconsistent-dllimport, -Wmicrosoft-abstract, -Wmicrosoft-anon-tag, -Wmicrosoft-cast, -Wmicrosoft-charize, -Wmicrosoft-comment-paste, -Wmicrosoft-const-init, -Wmicrosoft-cpp-macro, -Wmicrosoft-default-arg-redefinition, -Wmicrosoft-drectve-section, -Wmicrosoft-empty-enum, -Wmicrosoft-end-of-file and 21 more.

Code
-Wmicrosoft
Severity
warning

Source: clang.llvm.org. JSON record. This entry is a card. Help write this page.

Types declared in an anonymous. -Wmicrosoft-anon-tag

Clang enables some of the diagnostics that it controls by default. Clang has 6 messages for this flag.

Code
-Wmicrosoft-anon-tag
Severity
warning
Message
types declared in an anonymous
Message
struct
Message
union
Message
anonymous
Message
structs
Message
unions

Source: clang.llvm.org. JSON record. This entry is a card. Help write this page.

Exception specification of ‘…’ is a Microsoft extension. -Wmicrosoft-exception-spec

Clang enables some of the diagnostics that it controls by default. Clang has 6 messages for this flag.

Code
-Wmicrosoft-exception-spec
Severity
warning
Message
exception specification of ‘…’ is a Microsoft extension
Message
pointer to
Message
reference to
Message
exception specification in declaration does not match previous declaration
Message
exception specification in explicit instantiation does not match instantiated one
Message
exception specification of overriding function is more lax than base version

Source: clang.llvm.org. JSON record. This entry is a card. Help write this page.

Duplicate explicit instantiation of … ignored as a Microsoft extension. -Wmicrosoft-template

Clang enables it by default. It also controls -Wmicrosoft-template-shadow. Clang has 20 messages for this flag.

Code
-Wmicrosoft-template
Severity
warning
Message
duplicate explicit instantiation of {} ignored as a Microsoft extension
Message
use of member {} found via unqualified lookup into dependent bases of class templates is a Microsoft extension
Message
use of member {} before its declaration is a Microsoft extension
Message
using the undeclared type {} as a default template argument is a Microsoft extension
Message
non-type template argument containing a dereference operation is a Microsoft extension
Message
class template
Message
class template partial
Message
variable template

Source: clang.llvm.org. JSON record. This entry is a card. Help write this page.

… defined as. -Wmismatched-tags

Clang has 17 messages for this flag.

Code
-Wmismatched-tags
Severity
warning
Message
{} defined as
Message
a struct
Message
an interface
Message
a class
Message
template
Message
a struct
Message
an interface
Message
a class

Source: clang.llvm.org. JSON record. This entry is a card. Help write this page.

Declaration does not declare anything. -Wmissing-declarations

Clang enables it by default. Clang has 4 messages for this flag.

Code
-Wmissing-declarations
Severity
warning
Message
declaration does not declare anything
Message
‘{}’ is not permitted on a declaration of a type
Message
typedef requires a name
Message
‘{}’ ignored on this declaration

Source: clang.llvm.org. JSON record. This entry is a card. Help write this page.

Module ‘…’ conflicts with already-imported module ‘…’: …. -Wmodule-conflict

Clang enables it by default. Clang has 2 messages for this flag.

Code
-Wmodule-conflict
Severity
warning
Message
module ‘{}’ conflicts with already-imported module ‘{}’: {}
Message
module file ‘{}’ was validated as a system module and is now being imported as a non-system module; any difference in diagnostic options will be ignored

Source: clang.llvm.org. JSON record. This entry is a card. Help write this page.

A group of warnings. -Wmost

Clang enables some of the diagnostics that it controls by default. It also controls -Warray-parameter, -Wbool-operation, -Wcast-of-sel-type, -Wchar-subscripts, -Wcomment, -Wdelete-non-virtual-dtor, -Wextern-c-compat, -Wfor-loop-analysis, -Wformat, -Wframe-address, -Wimplicit, -Winfinite-recursion and 25 more.

Code
-Wmost
Severity
warning

Source: clang.llvm.org. JSON record. This entry is a card. Help write this page.

Use of. -Wnan-infinity-disabled

Clang enables it by default. Clang has 4 messages for this flag.

Code
-Wnan-infinity-disabled
Severity
warning
Message
use of
Message
infinity
Message
NaN
Message
via a macro

Source: clang.llvm.org. JSON record. This entry is a card. Help write this page.

Non-portable path to file ‘…’; specified path differs in case from file name on disk. -Wnonportable-include-path

Clang enables some of the diagnostics that it controls by default. It also controls -Wnonportable-include-path-separator. Clang has 4 messages for this flag.

Code
-Wnonportable-include-path
Severity
warning
Message
non-portable path to file ‘{}’; specified path differs in case from file name on disk
Message
non-portable path to file ‘{}’; specified path contains trailing
Message
whitespace
Message
dot

Source: clang.llvm.org. JSON record. This entry is a card. Help write this page.

Destination for. -Wnontrivial-memaccess

Clang enables it by default. It also controls -Wnontrivial-memcall. Clang has 6 messages for this flag.

Code
-Wnontrivial-memaccess
Severity
warning
Message
destination for
Message
source of
Message
first operand of
Message
second operand of
Message
primitive-default-initialize
Message
primitive-copy

Source: clang.llvm.org. JSON record. This entry is a card. Help write this page.

Conflicting nullability specifier on parameter types, … conflicts with existing specifier …. -Wnullability

Clang enables it by default. Clang has 5 messages for this flag.

Code
-Wnullability
Severity
warning
Message
conflicting nullability specifier on parameter types, {} conflicts with existing specifier {}
Message
conflicting nullability specifier on return types, {} conflicts with existing specifier {}
Message
nullability specifier {} conflicts with existing specifier {}
Message
synthesized setter {} for null_resettable property {} does not handle nil
Message
duplicate nullability specifier {}

Source: clang.llvm.org. JSON record. This entry is a card. Help write this page.

Pointer. -Wnullability-completeness

Clang enables it by default. It also controls -Wnullability-completeness-on-arrays. Clang has 3 messages for this flag.

Code
-Wnullability-completeness
Severity
warning
Message
pointer
Message
block pointer
Message
member pointer

Source: clang.llvm.org. JSON record. This entry is a card. Help write this page.

Nullability specifier … cannot be applied to non-pointer type …; did you mean to apply the specifier to the. -Wnullability-declspec

Clang has 6 messages for this flag.

Code
-Wnullability-declspec
Severity
error
Message
nullability specifier {} cannot be applied to non-pointer type {}; did you mean to apply the specifier to the
Message
pointer
Message
block pointer
Message
member pointer
Message
function pointer
Message
member function pointer

Source: clang.llvm.org. JSON record. This entry is a card. Help write this page.

Target-attribute based function overloads are not supported by NVCC and will be treated as a function redeclaration:new declaration is. -Wnvcc-compat

Clang has 9 messages for this flag.

Code
-Wnvcc-compat
Severity
warning
Message
target-attribute based function overloads are not supported by NVCC and will be treated as a function redeclaration:new declaration is
Message
__device__
Message
__global__
Message
__host__
Message
__host__ __device__
Message
__device__
Message
__global__
Message
__host__

Source: clang.llvm.org. JSON record. This entry is a card. Help write this page.

Designated initializer missing a ‘super’ call to a designated initializer of the super class. -Wobjc-designated-initializers

Clang enables it by default. Clang has 6 messages for this flag.

Code
-Wobjc-designated-initializers
Severity
warning
Message
designated initializer missing a ‘super’ call to a designated initializer of the super class
Message
designated initializer invoked a non-designated initializer
Message
designated initializer should only invoke a designated initializer on ‘super’
Message
method override for the designated initializer of the superclass {} not found
Message
convenience initializer missing a ‘self’ call to another initializer
Message
convenience initializer should not invoke an initializer on ‘super’

Source: clang.llvm.org. JSON record. This entry is a card. Help write this page.

Field … can overwrite instance variable … with variable sized type … in superclass …. -Wobjc-flexible-array

Clang enables it by default. Clang has 2 messages for this flag.

Code
-Wobjc-flexible-array
Severity
warning
Message
field {} can overwrite instance variable {} with variable sized type {} in superclass {}
Message
field {} with variable sized type {} is not visible to subclasses and can conflict with their instance variables

Source: clang.llvm.org. JSON record. This entry is a card. Help write this page.

Direct comparison of. -Wobjc-literal-compare

Clang enables it by default. It also controls -Wobjc-string-compare. Clang has 5 messages for this flag.

Code
-Wobjc-literal-compare
Severity
warning
Message
direct comparison of
Message
an array literal
Message
a dictionary literal
Message
a numeric literal
Message
a boxed expression

Source: clang.llvm.org. JSON record. This entry is a card. Help write this page.

Implicit boolean conversion of Objective-C object literal always evaluates to true. -Wobjc-literal-conversion

Clang enables it by default. Clang has 5 messages for this flag.

Code
-Wobjc-literal-conversion
Severity
warning
Message
implicit boolean conversion of Objective-C object literal always evaluates to true
Message
object of type {} is not compatible with
Message
array element type
Message
dictionary key type
Message
dictionary value type

Source: clang.llvm.org. JSON record. This entry is a card. Help write this page.

Class method … not found (return type defaults to ‘id’). -Wobjc-method-access

Clang enables it by default. Clang has 6 messages for this flag.

Code
-Wobjc-method-access
Severity
warning
Message
class method {} not found (return type defaults to ‘id’)
Message
class method {} not found (return type defaults to ‘id’); did you mean {}?
Message
instance method {} not found (return type defaults to ‘id’)
Message
instance method {} not found (return type defaults to ‘id’); did you mean {}?
Message
instance method {} found instead of class method {}
Message
instance method {} is being used on ‘Class’ which is not in the root class

Source: clang.llvm.org. JSON record. This entry is a card. Help write this page.

Class property … requires method … to be defined - use @dynamic or provide a method implementation in this class implementation. -Wobjc-property-implementation

Clang enables it by default. Clang has 4 messages for this flag.

Code
-Wobjc-property-implementation
Severity
warning
Message
class property {} requires method {} to be defined - use @dynamic or provide a method implementation in this class implementation
Message
class property {} requires method {} to be defined - use @dynamic or provide a method implementation in this category
Message
property {} requires method {} to be defined - use @synthesize, @dynamic or provide a method implementation in this class implementation
Message
property {} requires method {} to be defined - use @dynamic or provide a method implementation in this category

Source: clang.llvm.org. JSON record. This entry is a card. Help write this page.

Auto property synthesis will not synthesize property …; it will be implemented by its superclass, use @dynamic to acknowledge intention. -Wobjc-property-synthesis

Clang enables it by default. Clang has 3 messages for this flag.

Code
-Wobjc-property-synthesis
Severity
warning
Message
auto property synthesis will not synthesize property {}; it will be implemented by its superclass, use @dynamic to acknowledge intention
Message
auto property synthesis will not synthesize property {} because it is ‘readwrite’ but it will be synthesized ‘readonly’ via another property
Message
auto property synthesis will not synthesize property {} because it cannot share an ivar with another synthesized property

Source: clang.llvm.org. JSON record. This entry is a card. Help write this page.

A group of warnings. -Wobjc-signed-char-bool

Clang enables some of the diagnostics that it controls by default. It also controls -Wobjc-bool-constant-conversion, -Wobjc-signed-char-bool-implicit-float-conversion, -Wobjc-signed-char-bool-implicit-int-conversion, -Wtautological-objc-bool-compare.

Code
-Wobjc-signed-char-bool
Severity
warning

Source: clang.llvm.org. JSON record. This entry is a card. Help write this page.

Template parameter lists have a different number of parameters (… vs …). -Wodr

Clang enables it by default. Clang has 32 messages for this flag.

Code
-Wodr
Severity
warning
Message
template parameter lists have a different number of parameters ({} vs {})
Message
template parameter has different kinds in different translation units
Message
field {} declared with incompatible types in different translation units ({} vs. {})
Message
external function {} declared with incompatible types in different translation units ({} vs. {})
Message
instance variable {} declared with incompatible types in different translation units ({} vs. {})
Message
non-type template parameter declared with incompatible types in different translation units ({} vs. {})
Message
class
Message
instance

Source: clang.llvm.org. JSON record. This entry is a card. Help write this page.