Clang Flag: -Wc++98-compat-pedantic / -Wno-c++98-compat-pedantic

From emmtrix Wiki
Jump to navigation Jump to search
This article provides an overview of the Clang compiler flags -Wc++98-compat-pedantic and -Wno-c++98-compat-pedantic, focusing on their role in enabling and suppressing warnings regarding C++98 compatibility in pedantic mode. Developers use these flags to ensure their code can be compiled with compilers that are strictly conforming to the C++98 standard, or to suppress warnings for code that intentionally uses features not compatible with C++98.

The -Wc++98-compat-pedantic flag activates warnings for code constructs that are incompatible with C++98 when compiling in pedantic mode. This is useful for identifying parts of the code that may hinder compatibility with C++98 standards. Since the flag is default inactive, it needs to be explicitly enabled to start reporting these warnings.

Conversely, -Wno-c++98-compat-pedantic serves to deactivate these specific warnings. This flag is beneficial when the goal is to allow code that acknowledges and purposefully uses constructs beyond C++98, without being flagged during compilation.

These flags are part of a wider array of diagnostic tools provided by Clang to aid in maintaining and ensuring code compatibility across different C++ standards. They particularly cater to projects that need to uphold C++98 compatibility while also enabling developers to make informed decisions about when to use more modern C++ features.

 
AI Generated

Supergroups

Subroups

Warnings/Remarks

Default Active (Deactivate with -Wno-c++98-compat-pedantic)

None

Default Inactive (Activate with -Wc++98-compat-pedantic)

warn_cxx98_compat_array_size_conversion
warning: implicit conversion from array size expression of type A to
integral
enumeration
type C is incompatible with C++98

warn_cxx98_compat_cast_fn_obj warning: cast between pointer-to-function and pointer-to-object is incompatible with C++98
warn_cxx98_compat_empty_fnmacro_arg warning: empty macro arguments are incompatible with C++98
warn_cxx98_compat_enumerator_list_comma warning: commas at the end of enumerator lists are incompatible with C++98
warn_cxx98_compat_extern_template warning: extern templates are incompatible with C++98
warn_cxx98_compat_longlong warning: 'long long' is incompatible with C++98
warn_cxx98_compat_no_newline_eof warning: C++98 requires newline at end of file
warn_cxx98_compat_pp_line_too_big warning: #line number greater than 32767 is incompatible with C++98
warn_cxx98_compat_variadic_macro warning: variadic macros are incompatible with C++98
warn_cxx98_compat_alias_declaration warning: alias declarations are incompatible with C++98
warn_cxx98_compat_alignas warning: 'alignas' is incompatible with C++98
warn_cxx98_compat_alignof warning: alignof expressions are incompatible with C++98
warn_cxx98_compat_attribute warning: [[]] attributes are incompatible with C++ standards before C++11
warn_cxx98_compat_auto_type_specifier warning: 'auto' type specifier is incompatible with C++98
warn_cxx98_compat_constexpr warning: 'constexpr' specifier is incompatible with C++98
warn_cxx98_compat_ctor_list_init warning: constructor call from initializer list is incompatible with C++98
warn_cxx98_compat_decltype warning: 'decltype' type specifier is incompatible with C++98
warn_cxx98_compat_defaulted_deleted_function
warning:
defaulted
deleted
function definitions are incompatible with C++98

warn_cxx98_compat_delegating_ctor warning: delegating constructors are incompatible with C++98
warn_cxx98_compat_empty_scalar_initializer warning: scalar initialized from empty initializer list is incompatible with C++98
warn_cxx98_compat_empty_sizeless_initializer warning: initializing A from an empty initializer list is incompatible with C++98
warn_cxx98_compat_enum_fixed_underlying_type warning: enumeration types with a fixed underlying type are incompatible with C++98
warn_cxx98_compat_enum_friend warning: befriending enumeration type A is incompatible with C++98
warn_cxx98_compat_enum_nested_name_spec warning: enumeration type in nested name specifier is incompatible with C++98
warn_cxx98_compat_explicit_conversion_functions warning: explicit conversion functions are incompatible with C++98
warn_cxx98_compat_for_range warning: range-based for loop is incompatible with C++98
warn_cxx98_compat_friend_is_member warning: friend declaration naming a member of the declaring class is incompatible with C++98
warn_cxx98_compat_generalized_initializer_lists warning: generalized initializer lists are incompatible with C++98
warn_cxx98_compat_goto_into_protected_scope warning: jump from this goto statement to its label is incompatible with C++98
warn_cxx98_compat_indirect_goto_in_protected_scope
warning: jump from this
indirect
asm
goto statement to one of its possible targets is incompatible with C++98

warn_cxx98_compat_initializer_list_init warning: initialization of initializer_list object is incompatible with C++98
warn_cxx98_compat_inline_namespace warning: inline namespaces are incompatible with C++98
warn_cxx98_compat_lambda warning: lambda expressions are incompatible with C++98
warn_cxx98_compat_less_colon_colon warning: '<::' is treated as digraph '<:' (aka '[') followed by ':' in C++98
warn_cxx98_compat_literal_operator warning: literal operators are incompatible with C++98
warn_cxx98_compat_literal_ucn_control_character warning: universal character name referring to a control character is incompatible with C++98
warn_cxx98_compat_literal_ucn_escape_basic_scs warning: specifying character 'A' with a universal character name is incompatible with C++98
warn_cxx98_compat_noexcept_decl warning: noexcept specifications are incompatible with C++98
warn_cxx98_compat_noexcept_expr warning: noexcept expressions are incompatible with C++98
warn_cxx98_compat_non_static_member_use warning: use of non-static data member A in an unevaluated context is incompatible with C++98
warn_cxx98_compat_nonclass_type_friend warning: non-class friend type A is incompatible with C++98
warn_cxx98_compat_nonstatic_member_init warning: default member initializer for non-static data members is incompatible with C++98
warn_cxx98_compat_nontrivial_union_or_anon_struct_member
warning:
anonymous struct
union
member B with a non-trivial
default constructor
copy constructor
move constructor
copy assignment operator
move assignment operator
destructor
is incompatible with C++98

warn_cxx98_compat_nullptr warning: 'nullptr' is incompatible with C++98
warn_cxx98_compat_override_control_keyword warning: 'A' keyword is incompatible with C++98
warn_cxx98_compat_pass_non_pod_arg_to_vararg
warning: passing object of trivial but non-POD type A through variadic
function
block
method
constructor
is incompatible with C++98

warn_cxx98_compat_raw_string_literal warning: raw string literals are incompatible with C++98
warn_cxx98_compat_ref_qualifier warning: reference qualifiers on functions are incompatible with C++98
warn_cxx98_compat_reference_list_init warning: reference initialized from initializer list is incompatible with C++98
warn_cxx98_compat_rvalue_reference warning: rvalue references are incompatible with C++98
warn_cxx98_compat_scoped_enum warning: scoped enumerations are incompatible with C++98
warn_cxx98_compat_sfinae_access_control warning: substitution failure due to access control is incompatible with C++98
warn_cxx98_compat_static_assert warning: 'static_assert' declarations are incompatible with C++98
warn_cxx98_compat_static_data_member_in_union warning: static data member A in union is incompatible with C++98
warn_cxx98_compat_switch_into_protected_scope warning: jump from switch statement to this case label is incompatible with C++98
warn_cxx98_compat_template_arg_extra_parens warning: redundant parentheses surrounding address non-type template argument are incompatible with C++98
warn_cxx98_compat_template_arg_null warning: use of null pointer as non-type template argument is incompatible with C++98
warn_cxx98_compat_template_arg_object_internal
warning: non-type template argument referring to
function
object
B with internal linkage is incompatible with C++98

warn_cxx98_compat_template_outside_of_template warning: use of 'template' keyword outside of a template is incompatible with C++98
warn_cxx98_compat_template_parameter_default_in_function_template warning: default template arguments for a function template are incompatible with C++98
warn_cxx98_compat_trailing_return_type warning: trailing return types are incompatible with C++98
warn_cxx98_compat_two_right_angle_brackets warning: consecutive right angle brackets are incompatible with C++98 (use '> >')
warn_cxx98_compat_typename_outside_of_template warning: use of 'typename' outside of a template is incompatible with C++98
warn_cxx98_compat_unelaborated_friend_type
warning: befriending B without '
struct
interface
union
class
enum
' keyword is incompatible with C++98

warn_cxx98_compat_unicode_literal warning: unicode literals are incompatible with C++98
warn_cxx98_compat_unicode_type warning: 'A' type specifier is incompatible with C++98
warn_cxx98_compat_using_decl_constructor warning: inheriting constructors are incompatible with C++98
warn_cxx98_compat_variadic_templates warning: variadic templates are incompatible with C++98
warn_cxx98_compat_template_arg_local_type warning: local type A as template argument is incompatible with C++98
warn_cxx98_compat_template_arg_unnamed_type warning: unnamed type as template argument is incompatible with C++98
warn_cxx11_compat_constexpr_body_invalid_stmt
warning: use of this statement in a constexpr
function
constructor
is incompatible with C++ standards before C++14

warn_cxx11_compat_constexpr_body_multiple_return warning: multiple return statements in constexpr function is incompatible with C++ standards before C++14
warn_cxx11_compat_constexpr_body_no_return warning: constexpr function with no return statements is incompatible with C++ standards before C++14
warn_cxx11_compat_constexpr_local_var
warning: variable declaration in a constexpr
function
constructor
is incompatible with C++ standards before C++14

warn_cxx11_compat_constexpr_type_definition
warning: type definition in a constexpr
function
constructor
is incompatible with C++ standards before C++14

warn_cxx11_compat_decltype_auto_type_specifier warning: 'decltype(auto)' type specifier is incompatible with C++ standards before C++14
warn_cxx11_compat_deduced_return_type warning: return type deduction is incompatible with C++ standards before C++14
warn_cxx11_compat_digit_separator warning: digit separators are incompatible with C++ standards before C++14
warn_cxx11_compat_generic_lambda warning: generic lambdas are incompatible with C++11
warn_cxx11_compat_init_capture warning: initialized lambda captures are incompatible with C++ standards before C++14
warn_cxx11_compat_variable_template warning: variable templates are incompatible with C++ standards before C++14
warn_cxx14_compat_class_template_argument_deduction
warning: class template argument deduction is incompatible with C++ standards before C++17
 
; for compatibility, use explicit type name B

warn_cxx14_compat_constexpr_if warning: constexpr if is incompatible with C++ standards before C++17
warn_cxx14_compat_constexpr_on_lambda warning: constexpr on lambda expressions is incompatible with C++ standards before C++17
warn_cxx14_compat_decomp_decl warning: decomposition declarations are incompatible with C++ standards before C++17
warn_cxx14_compat_fold_expression warning: pack fold expression is incompatible with C++ standards before C++17
warn_cxx14_compat_init_statement
warning:
if
switch
initialization statements are incompatible with C++ standards before C++17

warn_cxx14_compat_inline_variable warning: inline variables are incompatible with C++ standards before C++17
warn_cxx14_compat_nested_namespace_definition warning: nested namespace definition is incompatible with C++ standards before C++17
warn_cxx14_compat_star_this_lambda_capture warning: by value capture of '*this' is incompatible with C++ standards before C++17
warn_cxx14_compat_static_assert_no_message warning: 'static_assert' with no message is incompatible with C++ standards before C++17
warn_cxx14_compat_template_nontype_parm_auto_type warning: non-type template parameters declared with A are incompatible with C++ standards before C++17
warn_cxx14_compat_template_template_param_typename warning: template template parameter using 'typename' is incompatible with C++ standards before C++17
warn_cxx14_compat_u8_character_literal warning: unicode literals are incompatible with C++ standards before C++17
warn_cxx14_compat_using_attribute_ns warning: default scope specifier for attributes is incompatible with C++ standards before C++17
warn_cxx17_compat_multi_using_declaration warning: use of multiple declarators in a single using declaration is incompatible with C++ standards before C++17
warn_cxx17_compat_using_declaration_pack warning: pack expansion using declaration is incompatible with C++ standards before C++17
warn_for_range_begin_end_types_differ warning: 'begin' and 'end' returning different types (A and B) is incompatible with C++ standards before C++17
warn_cxx17_compat_adl_only_template_id warning: use of function template name with no prior function template declaration in function call with explicit template arguments is incompatible with C++ standards before C++20
warn_cxx17_compat_bitfield_member_init warning: default member initializer for bit-field is incompatible with C++ standards before C++20
warn_cxx17_compat_capture_binding warning: captured structured bindings are incompatible with C++ standards before C++20
warn_cxx17_compat_constexpr_body_invalid_stmt
warning: use of this statement in a constexpr
function
constructor
is incompatible with C++ standards before C++20

warn_cxx17_compat_constexpr_ctor_missing_init warning: constexpr constructor that does not initialize all members is incompatible with C++ standards before C++20
warn_cxx17_compat_constexpr_function_try_block
warning: function try block in constexpr
function
constructor
is incompatible with C++ standards before C++20

warn_cxx17_compat_constexpr_local_var_no_init
warning: uninitialized variable in a constexpr
function
constructor
is incompatible with C++ standards before C++20

warn_cxx17_compat_constexpr_union_ctor_no_init warning: constexpr union constructor that does not initialize any member is incompatible with C++ standards before C++20
warn_cxx17_compat_constexpr_virtual warning: virtual constexpr functions are incompatible with C++ standards before C++20
warn_cxx17_compat_decomp_decl_spec
warning: decomposition declaration declared
'B'
with 'B' specifiers
is incompatible with C++ standards before C++20

warn_cxx17_compat_defaulted_comparison warning: defaulted comparison operators are incompatible with C++ standards before C++20
warn_cxx17_compat_defaulted_method_type_mismatch
warning: explicitly defaulting this
default constructor
copy constructor
move constructor
copy assignment operator
move assignment operator
destructor
with a type different from the implicit type is incompatible with C++ standards before C++20

warn_cxx17_compat_equals_this_lambda_capture warning: explicit capture of 'this' with a capture default of '=' is incompatible with C++ standards before C++20
warn_cxx17_compat_explicit_bool warning: explicit(bool) is incompatible with C++ standards before C++20
warn_cxx17_compat_for_range_init_stmt warning: range-based for loop initialization statements are incompatible with C++ standards before C++20
warn_cxx17_compat_init_capture_pack warning: initialized lambda capture packs are incompatible with C++ standards before C++20
warn_cxx17_compat_inline_nested_namespace_definition warning: inline nested namespace definition is incompatible with C++ standards before C++20
warn_cxx17_compat_lambda_def_ctor_assign
warning:
default construction
assignment
of lambda is incompatible with C++ standards before C++20

warn_cxx17_compat_lambda_template_parameter_list warning: explicit template parameter list for lambdas is incompatible with C++ standards before C++20
warn_cxx17_compat_missing_varargs_arg warning: passing no argument for the '...' parameter of a variadic macro is incompatible with C++ standards before C++20
warn_cxx17_compat_spaceship warning: '<=>' operator is incompatible with C++ standards before C++20
warn_cxx17_compat_template_nontype_parm_type warning: non-type template parameter of type A is incompatible with C++ standards before C++20
warn_cxx17_compat_unicode_type warning: 'char8_t' type specifier is incompatible with C++ standards before C++20
warn_cxx17_compat_using_decl_class_member_enumerator warning: member using declaration naming a non-member enumerator is incompatible with C++ standards before C++20
warn_cxx17_compat_using_decl_non_member_enumerator warning: member using declaration naming non-class 'A' enumerator is incompatible with C++ standards before C++20
warn_cxx17_compat_using_decl_scoped_enumerator warning: using declaration naming a scoped enumerator is incompatible with C++ standards before C++20
warn_cxx17_compat_using_enum_declaration warning: using enum declaration is incompatible with C++ standards before C++20
ext_subscript_overload
warning: overloaded A with
no
a defaulted
more than one
parameter is a C++23 extension

warn_cxx20_alias_in_init_statement warning: alias declaration in this context is incompatible with C++ standards before C++23
warn_cxx20_compat_auto_expr warning: 'auto' as a functional-style cast is incompatible with C++ standards before C++23
warn_cxx20_compat_consteval_if warning: consteval if is incompatible with C++ standards before C++23
warn_cxx20_compat_constexpr_body_invalid_stmt
warning: use of this statement in a constexpr
function
constructor
is incompatible with C++ standards before C++23

warn_cxx20_compat_constexpr_var
warning: definition of a
static variable
thread_local variable
variable of non-literal type
in a constexpr
function
constructor
is incompatible with C++ standards before C++23

warn_cxx20_compat_decl_attrs_on_lambda
warning:
an attribute specifier sequence
B
in this position is incompatible with C++ standards before C++23

warn_cxx20_compat_label_end_of_compound_statement warning: label at end of compound statement is incompatible with C++ standards before C++23
warn_cxx20_compat_operator_overload_static warning: declaring overloaded A as 'static' is incompatible with C++ standards before C++23
warn_cxx20_compat_size_t_suffix warning: 'size_t' suffix for literals is incompatible with C++ standards before C++23
warn_cxx20_compat_static_lambda warning: static lambdas are incompatible with C++ standards before C++23
warn_cxx23_compat_defaulted_comparison_constexpr_mismatch
warning: defaulted definition of
equality
three-way
equality
relational
comparison operator
three-way comparison operator
that is declared
constexpr
consteval
but
 
for which the corresponding implicit 'operator=='
invokes a non-constexpr comparison function is incompatible with C++ standards before C++23

warn_cxx23_compat_pp_directive
warning: use of a '#
elifdef
elifndef
' directive is incompatible with C++ standards before C++23

warn_cxx23_compat_warning_directive warning: #warning is incompatible with C++ standards before C++23
warn_cxx23_delimited_escape_sequence
warning:
delimited
named
escape sequences are incompatible with C++ standards before C++23

warn_cxx98_compat_temp_copy
warning:
copying variable
copying parameter
initializing template parameter
returning object
initializing statement expression result
throwing object
copying member subobject
copying array element
allocating object
copying temporary
initializing base subobject
initializing vector element
capturing value
of type C when binding a reference to a temporary would
invoke an inaccessible constructor
find no viable constructor
find ambiguous constructors
invoke a deleted constructor
in C++98

warn_cxx98_compat_top_level_semi warning: extra ';' outside of a function is incompatible with C++98
warn_cxx11_compat_constexpr_body_invalid_stmt
warning: warning: use of this statement in a constexpr
function
constructor
is incompatible with C++ standards before C++14

warn_cxx11_compat_constexpr_body_multiple_return warning: multiple return statements in constexpr function is incompatible with C++ standards before C++14
warn_cxx11_compat_constexpr_body_no_return warning: constexpr function with no return statements is incompatible with C++ standards before C++14
warn_cxx11_compat_constexpr_local_var
warning: warning: variable declaration in a constexpr
function
constructor
is incompatible with C++ standards before C++14

warn_cxx11_compat_constexpr_type_definition
warning: warning: type definition in a constexpr
function
constructor
is incompatible with C++ standards before C++14

warn_cxx11_compat_decltype_auto_type_specifier warning: 'decltype(auto)' type specifier is incompatible with C++ standards before C++14
warn_cxx11_compat_deduced_return_type warning: return type deduction is incompatible with C++ standards before C++14
warn_cxx11_compat_digit_separator warning: digit separators are incompatible with C++ standards before C++14
warn_cxx11_compat_generic_lambda warning: generic lambdas are incompatible with C++11
warn_cxx11_compat_init_capture warning: initialized lambda captures are incompatible with C++ standards before C++14
warn_cxx11_compat_variable_template warning: variable templates are incompatible with C++ standards before C++14
warn_cxx11_compat_binary_literal warning: binary integer literals are incompatible with C++ standards before C++14
warn_cxx14_compat_ns_enum_attribute
warning: attributes on
a namespace
an enumerator
declaration are incompatible with C++ standards before C++17

warn_cxx17_hex_literal warning: hexadecimal floating literals are incompatible with C++ standards before C++17
warn_cxx14_compat_class_template_argument_deduction
warning: warning: class template argument deduction is incompatible with C++ standards before C++17
 
; for compatibility, use explicit type name B

warn_cxx14_compat_constexpr_if warning: constexpr if is incompatible with C++ standards before C++17
warn_cxx14_compat_constexpr_on_lambda warning: constexpr on lambda expressions is incompatible with C++ standards before C++17
warn_cxx14_compat_decomp_decl warning: decomposition declarations are incompatible with C++ standards before C++17
warn_cxx14_compat_fold_expression warning: pack fold expression is incompatible with C++ standards before C++17
warn_cxx14_compat_init_statement
warning: warning:
if
switch
initialization statements are incompatible with C++ standards before C++17

warn_cxx14_compat_inline_variable warning: inline variables are incompatible with C++ standards before C++17
warn_cxx14_compat_nested_namespace_definition warning: nested namespace definition is incompatible with C++ standards before C++17
warn_cxx14_compat_star_this_lambda_capture warning: by value capture of '*this' is incompatible with C++ standards before C++17
warn_cxx14_compat_static_assert_no_message warning: 'static_assert' with no message is incompatible with C++ standards before C++17
warn_cxx14_compat_template_nontype_parm_auto_type warning: non-type template parameters declared with A are incompatible with C++ standards before C++17
warn_cxx14_compat_template_template_param_typename warning: template template parameter using 'typename' is incompatible with C++ standards before C++17
warn_cxx14_compat_u8_character_literal warning: unicode literals are incompatible with C++ standards before C++17
warn_cxx14_compat_using_attribute_ns warning: default scope specifier for attributes is incompatible with C++ standards before C++17
warn_cxx17_compat_multi_using_declaration warning: use of multiple declarators in a single using declaration is incompatible with C++ standards before C++17
warn_cxx17_compat_using_declaration_pack warning: pack expansion using declaration is incompatible with C++ standards before C++17
warn_for_range_begin_end_types_differ warning: 'begin' and 'end' returning different types (A and B) is incompatible with C++ standards before C++17
warn_cxx17_compat_designated_init warning: designated initializers are incompatible with C++ standards before C++20
warn_cxx17_compat_pointer_to_const_ref_member_on_rvalue warning: invoking a pointer to a 'const &' member function on an rvalue is incompatible with C++ standards before C++20
warn_cxx17_compat_adl_only_template_id warning: use of function template name with no prior function template declaration in function call with explicit template arguments is incompatible with C++ standards before C++20
warn_cxx17_compat_bitfield_member_init warning: default member initializer for bit-field is incompatible with C++ standards before C++20
warn_cxx17_compat_capture_binding warning: captured structured bindings are incompatible with C++ standards before C++20
warn_cxx17_compat_constexpr_body_invalid_stmt
warning: warning: use of this statement in a constexpr
function
constructor
is incompatible with C++ standards before C++20

warn_cxx17_compat_constexpr_ctor_missing_init warning: constexpr constructor that does not initialize all members is incompatible with C++ standards before C++20
warn_cxx17_compat_constexpr_function_try_block
warning: warning: function try block in constexpr
function
constructor
is incompatible with C++ standards before C++20

warn_cxx17_compat_constexpr_local_var_no_init
warning: warning: uninitialized variable in a constexpr
function
constructor
is incompatible with C++ standards before C++20

warn_cxx17_compat_constexpr_union_ctor_no_init warning: constexpr union constructor that does not initialize any member is incompatible with C++ standards before C++20
warn_cxx17_compat_constexpr_virtual warning: virtual constexpr functions are incompatible with C++ standards before C++20
warn_cxx17_compat_decomp_decl_spec
warning: warning: decomposition declaration declared
'B'
with 'B' specifiers
is incompatible with C++ standards before C++20

warn_cxx17_compat_defaulted_comparison warning: defaulted comparison operators are incompatible with C++ standards before C++20
warn_cxx17_compat_defaulted_method_type_mismatch
warning: warning: explicitly defaulting this
default constructor
copy constructor
move constructor
copy assignment operator
move assignment operator
destructor
with a type different from the implicit type is incompatible with C++ standards before C++20

warn_cxx17_compat_equals_this_lambda_capture warning: explicit capture of 'this' with a capture default of '=' is incompatible with C++ standards before C++20
warn_cxx17_compat_explicit_bool warning: explicit(bool) is incompatible with C++ standards before C++20
warn_cxx17_compat_for_range_init_stmt warning: range-based for loop initialization statements are incompatible with C++ standards before C++20
warn_cxx17_compat_init_capture_pack warning: initialized lambda capture packs are incompatible with C++ standards before C++20
warn_cxx17_compat_inline_nested_namespace_definition warning: inline nested namespace definition is incompatible with C++ standards before C++20
warn_cxx17_compat_lambda_def_ctor_assign
warning: warning:
default construction
assignment
of lambda is incompatible with C++ standards before C++20

warn_cxx17_compat_lambda_template_parameter_list warning: explicit template parameter list for lambdas is incompatible with C++ standards before C++20
warn_cxx17_compat_missing_varargs_arg warning: passing no argument for the '...' parameter of a variadic macro is incompatible with C++ standards before C++20
warn_cxx17_compat_spaceship warning: '<=>' operator is incompatible with C++ standards before C++20
warn_cxx17_compat_template_nontype_parm_type warning: non-type template parameter of type A is incompatible with C++ standards before C++20
warn_cxx17_compat_unicode_type warning: 'char8_t' type specifier is incompatible with C++ standards before C++20
warn_cxx17_compat_using_decl_class_member_enumerator warning: member using declaration naming a non-member enumerator is incompatible with C++ standards before C++20
warn_cxx17_compat_using_decl_non_member_enumerator warning: member using declaration naming non-class 'A' enumerator is incompatible with C++ standards before C++20
warn_cxx17_compat_using_decl_scoped_enumerator warning: using declaration naming a scoped enumerator is incompatible with C++ standards before C++20
warn_cxx17_compat_using_enum_declaration warning: using enum declaration is incompatible with C++ standards before C++20
ext_subscript_overload
warning: warning: overloaded A with
no
a defaulted
more than one
parameter is a C++23 extension

warn_cxx20_alias_in_init_statement warning: alias declaration in this context is incompatible with C++ standards before C++23
warn_cxx20_compat_auto_expr warning: 'auto' as a functional-style cast is incompatible with C++ standards before C++23
warn_cxx20_compat_consteval_if warning: consteval if is incompatible with C++ standards before C++23
warn_cxx20_compat_constexpr_body_invalid_stmt
warning: warning: use of this statement in a constexpr
function
constructor
is incompatible with C++ standards before C++23

warn_cxx20_compat_constexpr_var
warning: warning: definition of a
static variable
thread_local variable
variable of non-literal type
in a constexpr
function
constructor
is incompatible with C++ standards before C++23

warn_cxx20_compat_decl_attrs_on_lambda
warning: warning:
an attribute specifier sequence
B
in this position is incompatible with C++ standards before C++23

warn_cxx20_compat_label_end_of_compound_statement warning: label at end of compound statement is incompatible with C++ standards before C++23
warn_cxx20_compat_operator_overload_static warning: declaring overloaded A as 'static' is incompatible with C++ standards before C++23
warn_cxx20_compat_size_t_suffix warning: 'size_t' suffix for literals is incompatible with C++ standards before C++23
warn_cxx20_compat_static_lambda warning: static lambdas are incompatible with C++ standards before C++23
warn_cxx23_compat_defaulted_comparison_constexpr_mismatch
warning: warning: defaulted definition of
equality
three-way
equality
relational
comparison operator
three-way comparison operator
that is declared
constexpr
consteval
but
 
for which the corresponding implicit 'operator=='
invokes a non-constexpr comparison function is incompatible with C++ standards before C++23

warn_cxx23_compat_pp_directive
warning: warning: use of a '#
elifdef
elifndef
' directive is incompatible with C++ standards before C++23

warn_cxx23_compat_warning_directive warning: #warning is incompatible with C++ standards before C++23
warn_cxx23_delimited_escape_sequence
warning: warning:
delimited
named
escape sequences are incompatible with C++ standards before C++23