Clang Flag: -Wpedantic / -Wno-pedantic
Jump to navigation
Jump to search
Supergroups
Subroups
- -Wc11-extensions (4 elements)
- -Wc++11-extra-semi (1 element)
- -Wc++11-long-long (1 element)
- -Wc++14-attribute-extensions (1 element)
- -Wc++14-binary-literal (1 element)
- -Wc++17-attribute-extensions (1 element)
- -Wc++20-attribute-extensions (1 element)
- -Wc++20-designator (1 element)
- -Wflexible-array-extensions (2 elements)
- -Wfuture-attribute-extensions (3 elements)
- -Wgnu-anonymous-struct (1 element)
- -Wgnu-auto-type (1 element)
- -Wgnu-binary-literal (1 element)
- -Wgnu-case-range (1 element)
- -Wgnu-complex-integer (1 element)
- -Wgnu-compound-literal-initializer (1 element)
- -Wgnu-conditional-omitted-operand (1 element)
- -Wgnu-empty-struct (3 elements)
- -Wgnu-flexible-array-initializer (1 element)
- -Wgnu-flexible-array-union-member (1 element)
- -Wgnu-imaginary-constant (1 element)
- -Wgnu-include-next (1 element)
- -Wgnu-label-as-value (2 elements)
- -Wgnu-line-marker (1 element)
- -Wgnu-null-pointer-arithmetic (1 element)
- -Wgnu-offsetof-extensions (1 element)
- -Wgnu-pointer-arith (3 elements)
- -Wgnu-redeclared-enum (1 element)
- -Wgnu-statement-expression (2 elements)
- -Wgnu-union-cast (1 element)
- -Wgnu-zero-line-directive (1 element)
- -Wgnu-zero-variadic-macro-arguments (2 elements)
- -Wkeyword-macro (1 element)
- -Wlong-long (2 elements)
- -Wmicrosoft-charize (1 element)
- -Wmicrosoft-comment-paste (1 element)
- -Wmicrosoft-cpp-macro (1 element)
- -Wmicrosoft-end-of-file (1 element)
- -Wmicrosoft-enum-value (1 element)
- -Wmicrosoft-fixed-enum (1 element)
- -Wmicrosoft-flexible-array (2 elements)
- -Wmicrosoft-redeclare-static (1 element)
- -Woverlength-strings (1 element)
- -Wvla-extension (1 element)
- -Wzero-length-array (1 element)
- -Wdollar-in-identifier-extension (1 element)
- -Wlanguage-extension-token (1 element)
- -Winvalid-utf8 (1 element)
- -Wdelimited-escape-sequence-extension (1 element)
- -Wimport-preprocessor-directive-pedantic (1 element)
- -Wembedded-directive (1 element)
- -Wempty-translation-unit (1 element)
- -Wnullability-extension (1 element)
- -Wfixed-enum-extension (1 element)
- -Wgeneric-type-extension (1 element)
- -Wbit-int-extension (1 element)
- -Wundefined-internal-type (1 element)
- -Wretained-language-linkage (1 element)
- -Wcomplex-component-init (1 element)
- -Wnested-anon-types (1 element)
- -Wc++23-default-comp-relaxed-constexpr (1 element)
Warnings/Remarks
Default Active (Deactivate with -Wno-pedantic)
None
Default Inactive (Activate with -Wpedantic)
ext_aggregate_init_not_constant | warning: initializer for aggregate is not a compile-time constant | |||||||||||||||||||||||||||||||
ext_anonymous_record_with_type |
| |||||||||||||||||||||||||||||||
ext_anonymous_struct_union_qualified |
| |||||||||||||||||||||||||||||||
ext_array_size_conversion |
| |||||||||||||||||||||||||||||||
ext_auto_new_list_init | warning: ISO C++ standards before C++17 do not allow new expression for type A to use list-initialization | |||||||||||||||||||||||||||||||
ext_c99_array_usage |
| |||||||||||||||||||||||||||||||
ext_c99_compound_literal | warning: compound literals are a C99-specific feature | |||||||||||||||||||||||||||||||
ext_c99_feature | warning: 'A' is a C99 extension | |||||||||||||||||||||||||||||||
ext_c99_flexible_array_member | warning: flexible array members are a C99 feature | |||||||||||||||||||||||||||||||
ext_c99_variable_decl_in_for_loop | warning: variable declaration in for loop is a C99-specific feature | |||||||||||||||||||||||||||||||
ext_c_empty_initializer | warning: use of an empty initializer is a C2x extension | |||||||||||||||||||||||||||||||
ext_c_nullptr | warning: 'nullptr' is a C2x extension | |||||||||||||||||||||||||||||||
ext_cast_fn_obj | warning: cast between pointer-to-function and pointer-to-object is an extension | |||||||||||||||||||||||||||||||
ext_clang_diagnose_if | warning: 'diagnose_if' is a clang extension | |||||||||||||||||||||||||||||||
ext_clang_enable_if | warning: 'enable_if' is a clang extension | |||||||||||||||||||||||||||||||
ext_cxx11_enum_fixed_underlying_type | warning: enumeration types with a fixed underlying type are a C++11 extension | |||||||||||||||||||||||||||||||
ext_designated_init | warning: designated initializers are a C99 feature | |||||||||||||||||||||||||||||||
ext_dtor_name_ambiguous | warning: ISO C++ considers this destructor name lookup to be ambiguous | |||||||||||||||||||||||||||||||
ext_dtor_named_in_wrong_scope | warning: ISO C++ requires the name after '::~' to be found in the same scope as the name before '::~' | |||||||||||||||||||||||||||||||
ext_duplicate_declspec | warning: duplicate 'A' declaration specifier | |||||||||||||||||||||||||||||||
ext_ellipsis_exception_spec | warning: exception specification of '...' is a Microsoft extension | |||||||||||||||||||||||||||||||
ext_empty_fnmacro_arg | warning: empty macro arguments are a C99 feature | |||||||||||||||||||||||||||||||
ext_enum_value_not_int |
| |||||||||||||||||||||||||||||||
ext_enumerator_list_comma_c | warning: commas at the end of enumerator lists are a C99-specific feature | |||||||||||||||||||||||||||||||
ext_enumerator_list_comma_cxx | warning: commas at the end of enumerator lists are a C++11 extension | |||||||||||||||||||||||||||||||
ext_explicit_instantiation_without_qualified_id | warning: qualifier in explicit instantiation of A requires a template-id (a typedef is not permitted) | |||||||||||||||||||||||||||||||
ext_expr_not_ice |
| |||||||||||||||||||||||||||||||
ext_extern_template | warning: extern templates are a C++11 extension | |||||||||||||||||||||||||||||||
ext_extra_semi |
| |||||||||||||||||||||||||||||||
ext_forward_ref_enum | warning: ISO C forbids forward references to 'enum' types | |||||||||||||||||||||||||||||||
ext_freestanding_complex | warning: complex numbers are an extension in a freestanding C99 implementation | |||||||||||||||||||||||||||||||
ext_gnu_array_range | warning: use of GNU array range extension | |||||||||||||||||||||||||||||||
ext_hex_constant_invalid | warning: hexadecimal floating constants are a C99 feature | |||||||||||||||||||||||||||||||
ext_hex_literal_invalid | warning: hexadecimal floating literals are a C++17 feature | |||||||||||||||||||||||||||||||
ext_ident_list_in_param | warning: type-less parameter names in function declaration | |||||||||||||||||||||||||||||||
ext_in_class_initializer_non_constant | warning: in-class initializer for static data member is not a constant expression; folding it to a constant is a GNU extension | |||||||||||||||||||||||||||||||
ext_integer_complement_complex | warning: ISO C does not support '~' for complex conjugation of A | |||||||||||||||||||||||||||||||
ext_integer_increment_complex | warning: ISO C does not support '++'/'--' on complex integer type A | |||||||||||||||||||||||||||||||
ext_internal_in_extern_inline_quiet |
| |||||||||||||||||||||||||||||||
ext_line_comment | warning: // comments are not allowed in this language | |||||||||||||||||||||||||||||||
ext_main_used | warning: ISO C++ does not allow 'main' to be used by a program | |||||||||||||||||||||||||||||||
ext_mixed_decls_code | warning: mixing declarations and code is a C99 extension | |||||||||||||||||||||||||||||||
ext_multi_line_line_comment | warning: multi-line // comment | |||||||||||||||||||||||||||||||
ext_named_variadic_macro | warning: named variadic macros are a GNU extension | |||||||||||||||||||||||||||||||
ext_no_newline_eof | warning: no newline at end of file | |||||||||||||||||||||||||||||||
ext_nonstandard_escape | warning: use of non-standard escape character '\A' | |||||||||||||||||||||||||||||||
ext_ns_enum_attribute |
| |||||||||||||||||||||||||||||||
ext_opencl_double_without_pragma | warning: Clang permits use of type 'double' regardless pragma if 'cl_khr_fp64' is supported | |||||||||||||||||||||||||||||||
ext_pointer_to_const_ref_member_on_rvalue | warning: invoking a pointer to a 'const &' member function on an rvalue is a C++20 extension | |||||||||||||||||||||||||||||||
ext_pp_bad_vaargs_use | warning: __VA_ARGS__ can only appear in the expansion of a C99 variadic macro | |||||||||||||||||||||||||||||||
ext_pp_comma_expr | warning: comma operator in operand of #if | |||||||||||||||||||||||||||||||
ext_pp_ident_directive | warning: #ident is a language extension | |||||||||||||||||||||||||||||||
ext_pp_line_too_big | warning: C requires #line number to be less than A, allowed as extension | |||||||||||||||||||||||||||||||
ext_pp_opencl_variadic_macros | warning: variadic macros are a Clang extension in OpenCL | |||||||||||||||||||||||||||||||
ext_pp_warning_directive |
| |||||||||||||||||||||||||||||||
ext_return_has_void_expr |
| |||||||||||||||||||||||||||||||
ext_rvalue_to_reference_access_ctor |
| |||||||||||||||||||||||||||||||
ext_rvalue_to_reference_temp_copy_no_viable |
| |||||||||||||||||||||||||||||||
ext_sizeof_alignof_function_type | warning: invalid application of 'A' to a function type | |||||||||||||||||||||||||||||||
ext_sizeof_alignof_void_type | warning: invalid application of 'A' to a void type | |||||||||||||||||||||||||||||||
ext_subscript_non_lvalue | warning: ISO C90 does not allow subscripting non-lvalue array | |||||||||||||||||||||||||||||||
ext_thread_before | warning: '__thread' before 'A' | |||||||||||||||||||||||||||||||
ext_typecheck_addrof_void | warning: ISO C forbids taking the address of an expression of type 'void' | |||||||||||||||||||||||||||||||
ext_typecheck_cast_nonscalar | warning: C99 forbids casting nonscalar type A to the same type | |||||||||||||||||||||||||||||||
ext_typecheck_comparison_of_fptr_to_void | warning: equality comparison between function pointer and void pointer (A and B) | |||||||||||||||||||||||||||||||
ext_typecheck_cond_one_void | warning: C99 forbids conditional expressions with only one void side | |||||||||||||||||||||||||||||||
ext_typecheck_convert_pointer_void_func |
| |||||||||||||||||||||||||||||||
ext_typecheck_ordered_comparison_of_pointer_and_zero | warning: ordered comparison between pointer and zero (A and B) is an extension | |||||||||||||||||||||||||||||||
ext_variadic_macro | warning: variadic macros are a C99 feature | |||||||||||||||||||||||||||||||
warn_defined_in_function_type_macro | warning: macro expansion producing 'defined' has undefined behavior | |||||||||||||||||||||||||||||||
warn_ext_c2x_attributes | warning: [[]] attributes are a C2x extension | |||||||||||||||||||||||||||||||
warn_ext_cxx11_attributes | warning: [[]] attributes are a C++11 extension | |||||||||||||||||||||||||||||||
warn_format_conversion_argument_type_mismatch_pedantic |
| |||||||||||||||||||||||||||||||
warn_kern_is_method | warning: kernel function A is a member function; this may not be accepted by nvcc | |||||||||||||||||||||||||||||||
warn_strict_prototypes |
| |||||||||||||||||||||||||||||||
ext_anonymous_union | warning: anonymous unions are a C11 extension | |||||||||||||||||||||||||||||||
ext_c11_anonymous_struct | warning: anonymous structs are a C11 extension | |||||||||||||||||||||||||||||||
ext_c11_feature | warning: 'A' is a C11 extension | |||||||||||||||||||||||||||||||
ext_typecheck_compare_complete_incomplete_pointers |
| |||||||||||||||||||||||||||||||
ext_extra_semi_cxx11 | warning: extra ';' outside of a function is a C++11 extension | |||||||||||||||||||||||||||||||
ext_cxx11_longlong | warning: 'long long' is a C++11 extension | |||||||||||||||||||||||||||||||
ext_cxx14_attr | warning: use of the A attribute is a C++14 extension | |||||||||||||||||||||||||||||||
ext_binary_literal_cxx14 | warning: binary integer literals are a C++14 extension | |||||||||||||||||||||||||||||||
ext_cxx17_attr | warning: use of the A attribute is a C++17 extension | |||||||||||||||||||||||||||||||
ext_cxx20_attr | warning: use of the A attribute is a C++20 extension | |||||||||||||||||||||||||||||||
ext_cxx_designated_init | warning: designated initializers are a C++20 extension | |||||||||||||||||||||||||||||||
ext_flexible_array_in_array | warning: A may not be used as an array element due to flexible array member | |||||||||||||||||||||||||||||||
ext_flexible_array_in_struct | warning: A may not be nested in a struct due to flexible array member | |||||||||||||||||||||||||||||||
ext_cxx14_attr | warning: use of the A attribute is a C++14 extension | |||||||||||||||||||||||||||||||
ext_cxx17_attr | warning: use of the A attribute is a C++17 extension | |||||||||||||||||||||||||||||||
ext_cxx20_attr | warning: use of the A attribute is a C++20 extension | |||||||||||||||||||||||||||||||
ext_gnu_anonymous_struct | warning: anonymous structs are a GNU extension | |||||||||||||||||||||||||||||||
ext_auto_type | warning: '__auto_type' is a GNU extension | |||||||||||||||||||||||||||||||
ext_binary_literal | warning: binary integer literals are a GNU extension | |||||||||||||||||||||||||||||||
ext_gnu_case_range | warning: use of GNU case range extension | |||||||||||||||||||||||||||||||
ext_integer_complex | warning: complex integer types are a GNU extension | |||||||||||||||||||||||||||||||
ext_array_init_copy |
| |||||||||||||||||||||||||||||||
ext_gnu_conditional_expr | warning: use of GNU ?: conditional expression extension, omitting middle operand | |||||||||||||||||||||||||||||||
ext_empty_struct_union |
| |||||||||||||||||||||||||||||||
ext_flexible_array_empty_aggregate_gnu |
| |||||||||||||||||||||||||||||||
ext_no_named_members_in_struct_union |
| |||||||||||||||||||||||||||||||
ext_flexible_array_init | warning: flexible array initialization is a GNU extension | |||||||||||||||||||||||||||||||
ext_flexible_array_union_gnu | warning: flexible array member A in a union is a GNU extension | |||||||||||||||||||||||||||||||
ext_imaginary_constant | warning: imaginary constants are a GNU extension | |||||||||||||||||||||||||||||||
ext_pp_include_next_directive | warning: #include_next is a language extension | |||||||||||||||||||||||||||||||
ext_gnu_address_of_label | warning: use of GNU address-of-label extension | |||||||||||||||||||||||||||||||
ext_gnu_indirect_goto | warning: use of GNU indirect-goto extension | |||||||||||||||||||||||||||||||
ext_pp_gnu_line_directive | warning: this style of line directive is a GNU extension | |||||||||||||||||||||||||||||||
warn_gnu_null_ptr_arith | warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension | |||||||||||||||||||||||||||||||
ext_type_defined_in_offsetof |
| |||||||||||||||||||||||||||||||
ext_gnu_ptr_func_arith |
| |||||||||||||||||||||||||||||||
ext_gnu_subscript_void_type | warning: subscript of a pointer to void is a GNU extension | |||||||||||||||||||||||||||||||
ext_gnu_void_ptr |
| |||||||||||||||||||||||||||||||
ext_forward_ref_enum_def | warning: redeclaration of already-defined enum A is a GNU extension | |||||||||||||||||||||||||||||||
ext_gnu_statement_expr | warning: use of GNU statement expression extension | |||||||||||||||||||||||||||||||
ext_gnu_statement_expr_macro | warning: use of GNU statement expression extension from macro expansion | |||||||||||||||||||||||||||||||
ext_typecheck_cast_to_union | warning: cast to union type is a GNU extension | |||||||||||||||||||||||||||||||
ext_pp_line_zero | warning: #line directive with zero argument is a GNU extension | |||||||||||||||||||||||||||||||
ext_missing_varargs_arg | warning: must specify at least one argument for '...' parameter of variadic macro | |||||||||||||||||||||||||||||||
ext_paste_comma | warning: token pasting of ',' and __VA_ARGS__ is a GNU extension | |||||||||||||||||||||||||||||||
warn_pp_macro_hides_keyword | warning: keyword is hidden by macro definition | |||||||||||||||||||||||||||||||
ext_c99_longlong | warning: 'long long' is an extension when C99 mode is not enabled | |||||||||||||||||||||||||||||||
ext_cxx11_longlong | warning: 'long long' is a C++11 extension | |||||||||||||||||||||||||||||||
ext_charize_microsoft | warning: charizing operator #@ is a Microsoft extension | |||||||||||||||||||||||||||||||
ext_comment_paste_microsoft | warning: pasting two '/' tokens into a '//' comment is a Microsoft extension | |||||||||||||||||||||||||||||||
ext_pp_operator_used_as_macro_name | warning: C++ operator A (aka B) used as a macro name | |||||||||||||||||||||||||||||||
ext_ctrl_z_eof_microsoft | warning: treating Ctrl-Z as end-of-file is a Microsoft extension | |||||||||||||||||||||||||||||||
ext_enumerator_too_large | warning: enumerator value is not representable in the underlying type A | |||||||||||||||||||||||||||||||
ext_ms_c_enum_fixed_underlying_type | warning: enumeration types with a fixed underlying type are a Microsoft extension | |||||||||||||||||||||||||||||||
ext_flexible_array_empty_aggregate_ms |
| |||||||||||||||||||||||||||||||
ext_flexible_array_union_ms | warning: flexible array member A in a union is a Microsoft extension | |||||||||||||||||||||||||||||||
ext_static_non_static | warning: redeclaring non-static A as static is a Microsoft extension | |||||||||||||||||||||||||||||||
ext_string_too_long |
| |||||||||||||||||||||||||||||||
ext_vla | warning: variable length arrays are a C99 feature | |||||||||||||||||||||||||||||||
ext_typecheck_zero_array_size | warning: zero size arrays are an extension | |||||||||||||||||||||||||||||||
ext_dollar_in_identifier | warning: '$' in identifier | |||||||||||||||||||||||||||||||
ext_token_used | warning: extension used | |||||||||||||||||||||||||||||||
warn_invalid_utf8_in_comment | warning: invalid UTF-8 in comment | |||||||||||||||||||||||||||||||
ext_delimited_escape_sequence |
| |||||||||||||||||||||||||||||||
ext_pp_import_directive | warning: #import is a language extension | |||||||||||||||||||||||||||||||
ext_embedded_directive | warning: embedding a directive within macro arguments has undefined behavior | |||||||||||||||||||||||||||||||
ext_empty_translation_unit | warning: ISO C requires a translation unit to contain at least one declaration | |||||||||||||||||||||||||||||||
ext_nullability | warning: type nullability specifier A is a Clang extension | |||||||||||||||||||||||||||||||
ext_clang_c_enum_fixed_underlying_type | warning: enumeration types with a fixed underlying type are a Clang extension | |||||||||||||||||||||||||||||||
ext_generic_with_type_arg | warning: passing a type argument as the first operand to '_Generic' is a Clang extension | |||||||||||||||||||||||||||||||
ext_bit_int |
| |||||||||||||||||||||||||||||||
ext_undefined_internal_type |
| |||||||||||||||||||||||||||||||
ext_retained_language_linkage | warning: friend function A retaining previous language linkage is an extension | |||||||||||||||||||||||||||||||
ext_complex_component_init | warning: complex initialization specifying real and imaginary components is an extension | |||||||||||||||||||||||||||||||
ext_anonymous_record_with_anonymous_type |
| |||||||||||||||||||||||||||||||
ext_defaulted_comparison_constexpr_mismatch |
|