Programming Search⌘K

C++ errors and diagnostics, page 2 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.

… and. -Wcompound-token-split-by-space

Clang has 6 messages for this flag.

Code
-Wcompound-token-split-by-space
Severity
warning
Message
{} and
Message
introducing statement expression
Message
terminating statement expression
Message
introducing attribute
Message
terminating attribute
Message
forming pointer to member type

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

Consumed analysis attribute is attached to member of class … which isn’t marked as consumable. -Wconsumed

Clang has 8 messages for this flag.

Code
-Wconsumed
Severity
warning
Message
consumed analysis attribute is attached to member of class {} which isn’t marked as consumable
Message
state of variable ‘{}’ must match at the entry and exit of loop
Message
parameter ‘{}’ not in expected state when the function returns: expected ‘{}’, observed ‘{}’
Message
argument not in expected state; expected ‘{}’, observed ‘{}’
Message
return state set for an unconsumable type ‘{}’
Message
return value not in expected state; expected ‘{}’, observed ‘{}’
Message
invalid invocation of method ‘{}’ on object ‘{}’ while it is in the ‘{}’ state
Message
invalid invocation of method ‘{}’ on a temporary object while it is in the ‘{}’ state

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

Implicit conversion discards imaginary component: … to …. -Wconversion

Clang enables some of the diagnostics that it controls by default. It also controls -Wbitfield-enum-conversion, -Wbool-conversion, -Wcharacter-conversion, -Wconstant-conversion, -Wenum-conversion, -Wfloat-conversion, -Wimplicit-float-conversion, -Wimplicit-int-conversion, -Wint-conversion, -Wliteral-conversion, -Wnon-literal-null-conversion, -Wnull-conversion and 4 more. Clang has 5 messages for this flag.

Code
-Wconversion
Severity
warning
Message
implicit conversion discards imaginary component: {} to {}
Message
implicit conversion turns vector to scalar: {} to {}
Message
passing non-generic address space pointer to {} may cause dynamic conversion affecting performance
Message
non-type template argument with value ‘{}’ converted to ‘{}’ for unsigned template parameter of type {}
Message
non-type template argument value ‘{}’ truncated to ‘{}’ for template parameter of type {}

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

Under -fcoro-aligned-allocation, the non-aligned allocation function for the promise type … has higher precedence than the global aligned allocation function. -Wcoro-non-aligned-allocation-function

Clang enables it by default.

Code
-Wcoro-non-aligned-allocation-function
Severity
warning
Message
under -fcoro-aligned-allocation, the non-aligned allocation function for the promise type {} has higher precedence than the global aligned allocation function

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

Return type of ‘coroutine_handle<>::address should be ‘void*’ (have …) in order to get capability with existing async C API. -Wcoroutine

Clang enables it by default. It also controls -Walways-inline-coroutine, -Wcoro-non-aligned-allocation-function, -Wcoro-type-aware-allocation-function, -Wcoroutine-missing-unhandled-exception, -Wdeprecated-coroutine.

Code
-Wcoroutine
Severity
warning
Message
return type of ‘coroutine_handle<>::address should be ‘void*’ (have {}) in order to get capability with existing async C API

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

Import of an external symbol for CTU failed: …. -Wctu

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

Code
-Wctu
Severity
warning
Message
import of an external symbol for CTU failed: {}
Message
imported AST from ‘{}’ had been generated for a different language, current: {}, imported: {}
Message
imported AST from ‘{}’ had been generated for a different target, current: {}, imported: {}
Message
invocation for ‘{}’ is missing in the invocation list
Message
multiple invocations for ‘{}’ are found in the invocation list

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

… attribute parameter … is negative and will be ignored. -Wcuda-compat

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

Code
-Wcuda-compat
Severity
warning
Message
{} attribute parameter {} is negative and will be ignored
Message
nvcc does not allow ‘__{}__’ to appear after the parameter list in lambdas
Message
ignored ‘inline’ attribute on kernel function {}
Message
kernel function {} is a member function; this may not be accepted by nvcc
Message
argument to ‘#pragma unroll’ should not be in parentheses in CUDA C/C++

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

Temporary. -Wdangling

Clang enables it by default. It also controls -Wdangling-assignment, -Wdangling-assignment-gsl, -Wdangling-capture, -Wdangling-field, -Wdangling-gsl, -Wdangling-initializer-list, -Wreturn-stack-address. Clang has 11 messages for this flag.

Code
-Wdangling
Severity
warning
Message
temporary
Message
whose address is used as value of
Message
implicitly
Message
reference
Message
local
Message
variable
Message
reference
Message
array backing

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

Array backing. -Wdangling-initializer-list

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

Code
-Wdangling-initializer-list
Severity
warning
Message
array backing
Message
initializer list subobject of the allocated object
Message
the allocated initializer list

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

Declaration … is detected to be defined in multiple module units, first is from ‘…’ and second is from ‘…’; the compiler may not be good at merging the definitions. -Wdecls-in-multiple-modules

Code
-Wdecls-in-multiple-modules
Severity
warning
Message
declaration {} is detected to be defined in multiple module units, first is from ‘{}’ and second is from ‘{}’; the compiler may not be good at merging the definitions.

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

A group of warnings. -Wdefault-const-init

Clang enables some of the diagnostics that it controls by default. It also controls -Wdefault-const-init-field, -Wdefault-const-init-unsafe, -Wdefault-const-init-var.

Code
-Wdefault-const-init
Severity
warning

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

Explicitly defaulted. -Wdefaulted-function-deleted

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

Code
-Wdefaulted-function-deleted
Severity
warning
Message
explicitly defaulted
Message
<ERROR>
Message
equality
Message
three-way
Message
equality
Message
relational
Message
explicitly defaulted
Message
default constructor

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

Delete. -Wdelete-abstract-non-virtual-dtor

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

Code
-Wdelete-abstract-non-virtual-dtor
Severity
warning
Message
delete
Message
destructor

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

A group of warnings. -Wdelete-non-virtual-dtor

Clang enables some of the diagnostics that it controls by default. It also controls -Wdelete-abstract-non-virtual-dtor, -Wdelete-non-abstract-non-virtual-dtor.

Code
-Wdelete-non-virtual-dtor
Severity
warning

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

Delimited. -Wdelimited-escape-sequence-extension

Clang has 5 messages for this flag.

Code
-Wdelimited-escape-sequence-extension
Severity
warning
Message
delimited
Message
named
Message
C++23
Message
C2y
Message
Clang

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

Implicit conversion between vector types (’…’ and ‘…’) is deprecated; in the future, the behavior implied by ‘-fno-lax-vector-conversions’ will be the default. -Wdeprecate-lax-vec-conv-all

Clang enables it by default.

Code
-Wdeprecate-lax-vec-conv-all
Severity
warning
Message
implicit conversion between vector types (’{}’ and ‘{}’) is deprecated; in the future, the behavior implied by ‘-fno-lax-vector-conversions’ will be the default

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

-O4 is equivalent to -O3. -Wdeprecated

Clang enables some of the diagnostics that it controls by default. It also controls -Wdeprecated-anon-enum-enum-conversion, -Wdeprecated-array-compare, -Wdeprecated-attributes, -Wdeprecated-builtins, -Wdeprecated-comma-subscript, -Wdeprecated-copy, -Wdeprecated-copy-with-dtor, -Wdeprecated-declarations, -Wdeprecated-dynamic-exception-spec, -Wdeprecated-enum-compare, -Wdeprecated-enum-compare-conditional, -Wdeprecated-enum-enum-conversion and 13 more. Clang has 12 messages for this flag.

Code
-Wdeprecated
Severity
warning
Message
-O4 is equivalent to -O3
Message
access declarations are deprecated; use using declarations instead
Message
argument ‘{}’ is deprecated
Message
, use ‘{}’ instead
Message
argument ‘{}’ is deprecated, {}
Message
treating ‘{}’ input as ‘{}’ when in C++ mode, this behavior is deprecated
Message
‘default’ clause for ‘metadirective’ is deprecated; use ‘otherwise’ instead
Message
‘depend’ clause for ‘ordered’ is deprecated; use ‘doacross’ instead

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

Current handling of vector bool and vector pixel types in this context are deprecated; the default behaviour will soon change to that implied by the ‘-altivec-compat=xl’ option. -Wdeprecated-altivec-src-compat

Clang enables it by default.

Code
-Wdeprecated-altivec-src-compat
Severity
warning
Message
current handling of vector bool and vector pixel types in this context are deprecated; the default behaviour will soon change to that implied by the ‘-altivec-compat=xl’ option

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

Arithmetic between. -Wdeprecated-anon-enum-enum-conversion

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

Code
-Wdeprecated-anon-enum-enum-conversion
Severity
warning
Message
arithmetic between
Message
bitwise operation between
Message
comparison of
Message
conditional expression between
Message
compound assignment of
Message
({} and {})

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

Use of CUDA/HIP target attributes on deduction guides is deprecated; they will be rejected in a future version of Clang. -Wdeprecated-attributes

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

Code
-Wdeprecated-attributes
Severity
warning
Message
use of CUDA/HIP target attributes on deduction guides is deprecated; they will be rejected in a future version of Clang
Message
‘{}’ attribute is deprecated and may be removed in a future version of Clang
Message
‘lifetime_capture_by({})’ is deprecated; use ‘{}’ instead
Message
the ‘[[_Noreturn]]’ attribute spelling is deprecated in C23; use ‘[[noreturn]]’ instead
Message
applying attribute {} to a declaration is deprecated; apply it to the type instead
Message
specifying vector types with the ‘mode’ attribute is deprecated; use the ‘vector_size’ attribute instead

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

Definition of implicit copy. -Wdeprecated-copy

It also controls -Wdeprecated-copy-with-user-provided-copy. Clang has 5 messages for this flag.

Code
-Wdeprecated-copy
Severity
warning
Message
definition of implicit copy
Message
constructor
Message
assignment operator
Message
assignment operator
Message
constructor

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

Definition of implicit copy. -Wdeprecated-copy-with-user-provided-copy

Clang has 5 messages for this flag.

Code
-Wdeprecated-copy-with-user-provided-copy
Severity
warning
Message
definition of implicit copy
Message
constructor
Message
assignment operator
Message
assignment operator
Message
constructor

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

The … attribute is deprecated; use ‘amdgpu_waves_per_eu’ instead. -Wdeprecated-declarations

Clang enables it by default. It also controls -Wdeprecated-declarations-switch-case. Clang has 7 messages for this flag.

Code
-Wdeprecated-declarations
Severity
warning
Message
the {} attribute is deprecated; use ‘amdgpu_waves_per_eu’ instead
Message
specifying ‘uuid’ as an ATL attribute is deprecated; use __declspec instead
Message
use of C-style parameters in Objective-C method declarations is deprecated
Message
{} is deprecated
Message
{} may be deprecated because the receiver type is unknown
Message
{} is deprecated: {}
Message
property access is using {} method which is deprecated

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

Arithmetic between. -Wdeprecated-enum-compare

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

Code
-Wdeprecated-enum-compare
Severity
warning
Message
arithmetic between
Message
bitwise operation between
Message
comparison of
Message
conditional expression between
Message
compound assignment of
Message
({} and {})

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

Arithmetic between. -Wdeprecated-enum-compare-conditional

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

Code
-Wdeprecated-enum-compare-conditional
Severity
warning
Message
arithmetic between
Message
bitwise operation between
Message
comparison of
Message
conditional expression between
Message
compound assignment of
Message
({} and {})

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

Arithmetic between. -Wdeprecated-enum-enum-conversion

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

Code
-Wdeprecated-enum-enum-conversion
Severity
warning
Message
arithmetic between
Message
bitwise operation between
Message
comparison of
Message
conditional expression between
Message
compound assignment of
Message
({} and {})

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

Arithmetic between. -Wdeprecated-enum-float-conversion

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

Code
-Wdeprecated-enum-float-conversion
Severity
warning
Message
arithmetic between
Message
bitwise operation between
Message
comparison of
Message
conditional expression between
Message
compound assignment of
Message
floating-point
Message
enumeration
Message
with

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

A function. -Wdeprecated-non-prototype

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

Code
-Wdeprecated-non-prototype
Severity
warning
Message
a function
Message
declaration
Message
definition
Message
and is not supported in C23
Message
and is treated as a zero-parameter prototype in C23, conflicting with a
Message
previous
Message
subsequent
Message
declaration

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

Argument ‘-Ofast’ is deprecated; use ‘-O3’ to enable only conforming optimizations, or consult the documentation for the same behavior. -Wdeprecated-ofast

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

Code
-Wdeprecated-ofast
Severity
warning
Message
argument ‘-Ofast’ is deprecated; use ‘-O3’ to enable only conforming optimizations, or consult the documentation for the same behavior
Message
argument ‘-Ofast’ is deprecated; use ‘-O3 -ffast-math -fstack-arrays -fno-protect-parens’ for the same behavior, or ‘-O3 -fstack-arrays’ to enable only conforming optimizations

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

Decrement. -Wdeprecated-volatile

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

Code
-Wdeprecated-volatile
Severity
warning
Message
decrement
Message
increment
Message
use of result of assignment to object of volatile-qualified type {} is deprecated
Message
volatile-qualified parameter type {} is deprecated
Message
volatile-qualified return type {} is deprecated
Message
volatile qualifier in structured binding declaration is deprecated

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

‘. -Wdocumentation

It also controls -Wdocumentation-deprecated-sync, -Wdocumentation-html. Clang has 80 messages for this flag.

Code
-Wdocumentation
Severity
warning
Message
‘
Message
\
Message
@
Message
class
Message
interface
Message
protocol
Message
struct
Message
union

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

ISO C++ considers this destructor name lookup to be ambiguous. -Wdtor-name

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

Code
-Wdtor-name
Severity
warning
Message
ISO C++ considers this destructor name lookup to be ambiguous
Message
ISO C++ requires the name after ‘::~’ to be found in the same scope as the name before ‘::~’
Message
qualified destructor name only found in lexical scope; omit the qualifier to find this type name by unqualified lookup

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

Duplicate ‘…’ declaration specifier. -Wduplicate-decl-specifier

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

Code
-Wduplicate-decl-specifier
Severity
warning
Message
duplicate ‘{}’ declaration specifier
Message
duplicate ‘{}’ declaration specifier
Message
multiple identical address spaces specified for type
Message
duplicate ‘{}’ declaration specifier
Message
duplicate interpolation modifier {}

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

Destination for. -Wdynamic-class-memaccess

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

Code
-Wdynamic-class-memaccess
Severity
warning
Message
destination for
Message
source of
Message
first operand of
Message
second operand of
Message
class containing a
Message
overwritten
Message
copied
Message
moved

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

The form ‘-fmodule-file=<BMI-path>’ is deprecated for standard C++ named modules; consider to use ‘-fmodule-file=<module-name>=<BMI-path>’ instead. -Weager-load-cxx-named-modules

Clang enables it by default.

Code
-Weager-load-cxx-named-modules
Severity
warning
Message
the form ‘-fmodule-file=<BMI-path>’ is deprecated for standard C++ named modules; consider to use ‘-fmodule-file=<module-name>=<BMI-path>’ instead

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

Defer statement has empty body. -Wempty-body

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

Code
-Wempty-body
Severity
warning
Message
defer statement has empty body
Message
for loop has empty body
Message
if statement has empty body
Message
range-based for loop has empty body
Message
switch statement has empty body
Message
while loop has empty body

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

Arithmetic between. -Wenum-compare

Clang enables it by default. It also controls -Wdeprecated-enum-compare, -Wenum-compare-switch. Clang has 6 messages for this flag.

Code
-Wenum-compare
Severity
warning
Message
arithmetic between
Message
bitwise operation between
Message
comparison of
Message
conditional expression between
Message
compound assignment of
Message
({} and {})

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

Arithmetic between. -Wenum-compare-conditional

Clang enables some of the diagnostics that it controls by default. It also controls -Wdeprecated-enum-compare-conditional. Clang has 6 messages for this flag.

Code
-Wenum-compare-conditional
Severity
warning
Message
arithmetic between
Message
bitwise operation between
Message
comparison of
Message
conditional expression between
Message
compound assignment of
Message
({} and {})

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

A group of warnings. -Wenum-conversion

Clang enables some of the diagnostics that it controls by default. It also controls -Wenum-compare-conditional, -Wenum-enum-conversion, -Wenum-float-conversion, -Wimplicit-enum-enum-cast.

Code
-Wenum-conversion
Severity
warning

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

Arithmetic between. -Wenum-enum-conversion

Clang enables some of the diagnostics that it controls by default. It also controls -Wdeprecated-enum-enum-conversion. Clang has 13 messages for this flag.

Code
-Wenum-enum-conversion
Severity
error
Message
arithmetic between
Message
bitwise operation between
Message
comparison of
Message
conditional expression between
Message
compound assignment of
Message
({} and {})
Message
invalid
Message
arithmetic between

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

Arithmetic between. -Wenum-float-conversion

Clang enables some of the diagnostics that it controls by default. It also controls -Wdeprecated-enum-float-conversion. Clang has 12 messages for this flag.

Code
-Wenum-float-conversion
Severity
warning
Message
arithmetic between
Message
bitwise operation between
Message
comparison of
Message
conditional expression between
Message
compound assignment of
Message
floating-point
Message
enumeration
Message
with

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

Excess elements in. -Wexcess-initializers

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

Code
-Wexcess-initializers
Severity
warning
Message
excess elements in
Message
array
Message
vector
Message
matrix
Message
scalar
Message
union
Message
struct
Message
excess elements in initializer for indivisible sizeless type {}

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

Empty. -Wextern-c-compat

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

Code
-Wextern-c-compat
Severity
warning
Message
empty
Message
struct
Message
union
Message
size 1
Message
non-zero size

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

A group of warnings. -Wextra

Clang enables some of the diagnostics that it controls by default. It also controls -Wcast-function-type-mismatch, -Wdeprecated-copy, -Wempty-init-stmt, -Wfuse-ld-path, -Wignored-qualifiers, -Winitializer-overrides, -Wmissing-field-initializers, -Wmissing-method-return-type, -Wnull-pointer-arithmetic, -Wnull-pointer-subtraction, -Wsemicolon-before-method-body, -Wsign-compare and 5 more.

Code
-Wextra
Severity
warning

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

Extra ‘;’. -Wextra-semi

It also controls -Wc++11-extra-semi, -Wc++98-compat-extra-semi. Clang has 6 messages for this flag.

Code
-Wextra-semi
Severity
warning
Message
extra ‘;’
Message
outside of a function
Message
inside a {}
Message
inside instance variable list
Message
after member function definition
Message
extra ‘;’ after member function definition

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

Variable … is. -Wfor-loop-analysis

Clang has 9 messages for this flag.

Code
-Wfor-loop-analysis
Severity
warning
Message
variable {} is
Message
decremented
Message
incremented
Message
variable
Message
s
Message
{}
Message
s {} and {}
Message
s {}, {}, and {}

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

Using ‘%P’ format specifier without precision. -Wformat

Clang enables it by default. It also controls -Wformat-extra-args, -Wformat-insufficient-args, -Wformat-invalid-specifier, -Wformat-overflow, -Wformat-security, -Wformat-truncation, -Wformat-y2k, -Wformat-zero-length, -Wnonnull. Clang has 61 messages for this flag.

Code
-Wformat
Severity
warning
Message
using ‘%P’ format specifier without precision
Message
using ‘%P’ format specifier with an Objective-C pointer results in dumping runtime object structure, not object value
Message
values of type
Message
enum values with underlying type
Message
using ‘{}’ format specifier, but argument has boolean value
Message
format argument modifies specifier at position {}, but it should modify specifier at position {}
Message
format argument is
Message
a value

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

Fewer. -Wformat-insufficient-args

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

Code
-Wformat-insufficient-args
Severity
warning
Message
fewer
Message
more
Message
more ‘%’ conversions than data arguments

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

‘…’. -Wformat-non-iso

Clang has 5 messages for this flag.

Code
-Wformat-non-iso
Severity
warning
Message
‘{}’
Message
length modifier
Message
conversion specifier
Message
using length modifier ‘{}’ with conversion specifier ‘{}’ is not supported by ISO C
Message
positional arguments are not supported by ISO C

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

Values of type. -Wformat-pedantic

Clang has 6 messages for this flag.

Code
-Wformat-pedantic
Severity
warning
Message
values of type
Message
enum values with underlying type
Message
signedness of format specifier ‘{}’ is incompatible with ‘{}’
Message
format specifies type {} but the argument has
Message
type
Message
underlying type

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

‘…’ may overflow; destination buffer in argument … has size …, but the corresponding specifier may require size …. -Wfortify-source

Clang enables it by default. It also controls -Wformat-overflow, -Wformat-truncation. Clang has 7 messages for this flag.

Code
-Wfortify-source
Severity
warning
Message
‘{}’ may overflow; destination buffer in argument {} has size {}, but the corresponding specifier may require size {}
Message
‘{}’ size argument is negative
Message
‘{}’ will always overflow; destination buffer has size {}, but size argument is {}
Message
‘{}’ will always read past the end of the source buffer; source buffer has size {}, but the size is {}
Message
‘{}’ size argument is too large; destination buffer has size {}, but size argument is {}
Message
‘{}’ will always overflow; destination buffer has size {}, but the source string has length {} (including NUL byte)
Message
‘umask’ argument sets non-file-permission bits (0{}); those bits are ignored

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