| //===-- DiagnosticKinds.def - C Family Diagnostic Kind Database -*- C++ -*-===// |
| // |
| // The LLVM Compiler Infrastructure |
| // |
| // This file was developed by Chris Lattner and is distributed under |
| // the University of Illinois Open Source License. See LICENSE.TXT for details. |
| // |
| //===----------------------------------------------------------------------===// |
| // |
| // This file defines the DiagnosticKind database. |
| // |
| //===----------------------------------------------------------------------===// |
| |
| // Flags for diagnostic: |
| // |
| // DIAG_TYPE - Allows one of: |
| // NOTE - Informational message. |
| // WARNING - Warning. |
| // EXTENSION - Notification that an extension to the language is being used. |
| // ERROR - Error, compilation will stop after parsing completes. |
| // FATAL - Fatal error: parsing must stop. |
| |
| //===----------------------------------------------------------------------===// |
| // Portability |
| //===----------------------------------------------------------------------===// |
| |
| DIAG(port_target_macro_use, NOTE, |
| "use of a target-specific macro, source is not 'portable'") |
| |
| DIAG(port_target_builtin_use, NOTE, |
| "use of a target-specific builtin function, source is not 'portable'") |
| |
| DIAG(port_wchar_t, NOTE, |
| "sizeof(wchar_t) varies between targets, source is not 'portable'") |
| |
| //===----------------------------------------------------------------------===// |
| // Lexer Diagnostics |
| //===----------------------------------------------------------------------===// |
| |
| DIAG(null_in_string, WARNING, |
| "null character(s) preserved in string literal") |
| DIAG(null_in_char , WARNING, |
| "null character(s) preserved in character literal") |
| DIAG(null_in_file , WARNING, |
| "null character ignored") |
| DIAG(nested_block_comment, WARNING, |
| "\"/*\" within block comment") |
| DIAG(escaped_newline_block_comment_end, WARNING, |
| "escaped newline between */ characters at block comment end") |
| DIAG(backslash_newline_space, WARNING, |
| "backslash and newline separated by space") |
| |
| // Trigraphs. |
| DIAG(trigraph_ignored, WARNING, "trigraph ignored") |
| DIAG(trigraph_ignored_block_comment, WARNING, |
| "ignored trigraph would end block comment") |
| DIAG(trigraph_ends_block_comment, WARNING, |
| "trigraph ends block comment") |
| DIAG(trigraph_converted, WARNING, |
| "trigraph converted to '%0' character") |
| |
| DIAG(ext_multi_line_bcpl_comment, EXTENSION, |
| "multi-line // comment") |
| DIAG(ext_bcpl_comment, EXTENSION, |
| "// comments are not allowed in this language") |
| DIAG(ext_no_newline_eof, EXTENSION, |
| "no newline at end of file") |
| DIAG(ext_backslash_newline_eof, EXTENSION, |
| "backslash-newline at end of file") |
| DIAG(ext_dollar_in_identifier, EXTENSION, |
| "'$' in identifier") |
| DIAG(charize_microsoft_ext, EXTENSION, |
| "@# is a microsoft extension") |
| |
| DIAG(ext_token_used, EXTENSION, |
| "extension used") |
| |
| DIAG(err_unterminated_string, ERROR, |
| "missing terminating \" character") |
| DIAG(err_unterminated_char, ERROR, |
| "missing terminating ' character") |
| DIAG(err_empty_character, ERROR, |
| "empty character constant") |
| DIAG(err_unterminated_block_comment, ERROR, |
| "unterminated /* comment") |
| DIAG(err_invalid_character_to_charify, ERROR, |
| "invalid argument to convert to character") |
| |
| //===----------------------------------------------------------------------===// |
| // Preprocessor Diagnostics |
| //===----------------------------------------------------------------------===// |
| |
| DIAG(pp_hash_warning, WARNING, |
| "#warning%0") |
| DIAG(pp_include_next_in_primary, WARNING, |
| "#include_next in primary source file") |
| DIAG(pp_include_next_absolute_path, WARNING, |
| "#include_next with absolute path") |
| DIAG(ext_c99_whitespace_required_after_macro_name, WARNING, |
| "ISO C99 requires whitespace after the macro name") |
| DIAG(pp_pragma_once_in_main_file, WARNING, |
| "#pragma once in main file") |
| DIAG(pp_pragma_sysheader_in_main_file, WARNING, |
| "#pragma system_header ignored in main file") |
| DIAG(pp_poisoning_existing_macro, WARNING, |
| "poisoning existing macro") |
| DIAG(pp_out_of_date_dependency, WARNING, |
| "current file is older than dependency %0") |
| DIAG(pp_undef_builtin_macro, WARNING, |
| "undefining builtin macro") |
| DIAG(pp_redef_builtin_macro, WARNING, |
| "redefining builtin macro") |
| DIAG(pp_macro_not_used, WARNING, // -Wunused-macros |
| "macro is not used") |
| DIAG(pp_invalid_string_literal, WARNING, |
| "invalid string literal, ignoring final '\\'") |
| DIAG(warn_pp_expr_overflow, WARNING, |
| "integer overflow in preprocessor expression") |
| DIAG(warn_pp_convert_lhs_to_positive, WARNING, |
| "left side of operator converted from negative value to unsigned: %0") |
| DIAG(warn_pp_convert_rhs_to_positive, WARNING, |
| "right side of operator converted from negative value to unsigned: %0") |
| |
| DIAG(ext_pp_import_directive, EXTENSION, |
| "#import is a language extension") |
| DIAG(ext_pp_ident_directive, EXTENSION, |
| "#ident is a language extension") |
| DIAG(ext_pp_include_next_directive, EXTENSION, |
| "#include_next is a language extension") |
| DIAG(ext_pp_warning_directive, EXTENSION, |
| "#warning is a language extension") |
| DIAG(ext_pp_extra_tokens_at_eol, EXTENSION, |
| "extra tokens at end of %0 directive") |
| DIAG(ext_pp_comma_expr, EXTENSION, |
| "comma operator in operand of #if") |
| DIAG(ext_pp_bad_vaargs_use, EXTENSION, |
| "__VA_ARGS__ can only appear in the expansion of a C99 variadic macro") |
| DIAG(ext_pp_macro_redef, EXTENSION, |
| "\"%0\" macro redefined") |
| DIAG(ext_pp_macro_redef2, EXTENSION, |
| "this is previous definition") |
| DIAG(ext_variadic_macro, EXTENSION, |
| "variadic macros were introduced in C99") |
| DIAG(ext_named_variadic_macro, EXTENSION, |
| "named variadic macros are a GNU extension") |
| DIAG(ext_embedded_directive, EXTENSION, |
| "embedding a directive within macro arguments is not portable") |
| DIAG(ext_missing_varargs_arg, EXTENSION, |
| "varargs argument missing, but tolerated as an extension") |
| DIAG(ext_empty_fnmacro_arg, EXTENSION, |
| "empty macro arguments were standardized in C99") |
| |
| DIAG(ext_pp_base_file, EXTENSION, |
| "__BASE_FILE__ is a language extension") |
| DIAG(ext_pp_include_level, EXTENSION, |
| "__INCLUDE_LEVEL__ is a language extension") |
| DIAG(ext_pp_timestamp, EXTENSION, |
| "__TIMESTAMP__ is a language extension") |
| |
| DIAG(err_pp_invalid_directive, ERROR, |
| "invalid preprocessing directive") |
| DIAG(err_pp_hash_error, ERROR, |
| "#error%0") |
| DIAG(err_pp_file_not_found, ERROR, |
| "'%0' file not found") |
| DIAG(err_pp_empty_filename, ERROR, |
| "empty filename") |
| DIAG(err_pp_include_too_deep, ERROR, |
| "#include nested too deeply") |
| DIAG(err_pp_expects_filename, ERROR, |
| "expected \"FILENAME\" or <FILENAME>") |
| DIAG(err_pp_macro_not_identifier, ERROR, |
| "macro names must be identifiers") |
| DIAG(err_pp_missing_macro_name, ERROR, |
| "macro name missing") |
| DIAG(err_pp_missing_rparen_in_macro_def, ERROR, |
| "missing ')' in macro parameter list") |
| DIAG(err_pp_invalid_tok_in_arg_list, ERROR, |
| "invalid token in macro parameter list") |
| DIAG(err_pp_expected_ident_in_arg_list, ERROR, |
| "expected identifier in macro parameter list") |
| DIAG(err_pp_expected_comma_in_arg_list, ERROR, |
| "expected comma in macro parameter list") |
| DIAG(err_pp_duplicate_name_in_arg_list, ERROR, |
| "duplicate macro parameter name \"%0\"") |
| DIAG(err_pp_stringize_not_parameter, ERROR, |
| "'#' is not followed by a macro parameter") |
| DIAG(err_pp_malformed_ident, ERROR, |
| "invalid #ident directive") |
| DIAG(err_pp_unterminated_conditional, ERROR, |
| "unterminated conditional directive") |
| DIAG(pp_err_else_after_else, ERROR, |
| "#else after #else") |
| DIAG(pp_err_elif_after_else, ERROR, |
| "#elif after #else") |
| DIAG(pp_err_else_without_if, ERROR, |
| "#else without #if") |
| DIAG(pp_err_elif_without_if, ERROR, |
| "#elif without #if") |
| DIAG(err_pp_endif_without_if, ERROR, |
| "#endif without #if") |
| DIAG(err_pp_expected_value_in_expr, ERROR, |
| "expected value in expression") |
| DIAG(err_pp_missing_val_before_operator, ERROR, |
| "missing value before operator") |
| DIAG(err_pp_expected_rparen, ERROR, |
| "expected ')' in preprocessor expression") |
| DIAG(err_pp_expected_eol, ERROR, |
| "expected end of line in preprocessor expression") |
| DIAG(err_pp_defined_requires_identifier, ERROR, |
| "operator \"defined\" requires an identifier") |
| DIAG(err_pp_missing_rparen, ERROR, |
| "missing ')' after \"defined\"") |
| DIAG(err_pp_colon_without_question, ERROR, |
| "':' without preceding '?'") |
| DIAG(err_pp_question_without_colon, ERROR, |
| "'?' without following ':'") |
| DIAG(err_pp_division_by_zero, ERROR, |
| "division by zero in preprocessor expression") |
| DIAG(err_pp_remainder_by_zero, ERROR, |
| "remainder by zero in preprocessor expression") |
| DIAG(err_pp_expr_bad_token, ERROR, |
| "token is not valid in preprocessor expressions") |
| DIAG(err_pp_invalid_poison, ERROR, |
| "can only poison identifier tokens") |
| DIAG(err_pp_used_poisoned_id, ERROR, |
| "attempt to use a poisoned identifier") |
| DIAG(err__Pragma_malformed, ERROR, |
| "_Pragma takes a parenthesized string literal") |
| DIAG(err_defined_macro_name, ERROR, |
| "\"defined\" cannot be used as a macro name") |
| DIAG(err_paste_at_start, ERROR, |
| "\"##\" cannot appear at start of macro expansion") |
| DIAG(err_paste_at_end, ERROR, |
| "\"##\" cannot appear at end of macro expansion") |
| DIAG(err_unterm_macro_invoc, ERROR, |
| "unterminated function-like macro invocation") |
| DIAG(err_too_many_args_in_macro_invoc, ERROR, |
| "too many arguments provided to function-like macro invocation") |
| DIAG(err_too_few_args_in_macro_invoc, ERROR, |
| "too few arguments provided to function-like macro invocation") |
| DIAG(err_pp_bad_paste, ERROR, |
| "pasting formed \"%0\", an invalid preprocessing token") |
| DIAG(err_pp_operator_used_as_macro_name, ERROR, |
| "C++ operator \"%0\" cannot be used as a macro name") |
| DIAG(err_pp_illegal_floating_literal, ERROR, |
| "floating point literal in preprocessor expression") |
| |
| // Should be a sorry? |
| DIAG(err_pp_I_dash_not_supported, ERROR, |
| "-I- not supported, please use -iquote instead") |
| |
| //===----------------------------------------------------------------------===// |
| // Parser Diagnostics |
| //===----------------------------------------------------------------------===// |
| |
| DIAG(w_type_defaults_to_int, WARNING, |
| "type defaults to 'int'") |
| DIAG(w_no_declarators, WARNING, |
| "declaration does not declare anything") |
| DIAG(w_asm_qualifier_ignored, WARNING, |
| "ignored %0 qualifier on asm") |
| |
| DIAG(ext_empty_source_file, EXTENSION, |
| "ISO C forbids an empty source file") |
| DIAG(ext_top_level_semi, EXTENSION, |
| "ISO C does not allow an extra ';' outside of a function") |
| DIAG(ext_extra_struct_semi, EXTENSION, |
| "ISO C does not allow an extra ';' inside a struct or union") |
| DIAG(ext_duplicate_declspec, EXTENSION, |
| "duplicate '%0' declaration specifier") |
| DIAG(ext_plain_complex, EXTENSION, |
| "ISO C does not support plain '_Complex' meaning '_Complex double'") |
| DIAG(ext_integer_complex, EXTENSION, |
| "ISO C does not support complex integer types") |
| DIAG(ext_thread_before, EXTENSION, |
| "'__thread' before 'static'") |
| |
| DIAG(ext_empty_struct_union_enum, EXTENSION, |
| "use of empty %0 extension") |
| |
| DIAG(ext_ident_list_in_param, EXTENSION, |
| "type-less parameter names in function declaration") |
| DIAG(ext_c99_array_usage, EXTENSION, |
| "use of C99-specific array features") |
| DIAG(ext_c99_variable_decl_in_for_loop, EXTENSION, |
| "variable declaration in for loop is a C99-specific feature") |
| DIAG(ext_c99_compound_literal, EXTENSION, |
| "compound literals are a C99-specific feature") |
| DIAG(ext_c99_enumerator_list_comma, EXTENSION, |
| "commas at the end of enumerator lists are a C99-specific feature") |
| |
| DIAG(ext_gnu_indirect_goto, EXTENSION, |
| "use of GNU indirect-goto extension") |
| DIAG(ext_gnu_address_of_label, EXTENSION, |
| "use of GNU address-of-label extension") |
| DIAG(ext_gnu_statement_expr, EXTENSION, |
| "use of GNU statement expression extension") |
| DIAG(ext_gnu_conditional_expr, EXTENSION, |
| "use of GNU ?: expression extension, eliding middle term") |
| DIAG(ext_gnu_empty_initializer, EXTENSION, |
| "use of GNU empty initializer extension") |
| DIAG(ext_gnu_array_range, EXTENSION, |
| "use of GNU array range extension") |
| DIAG(ext_gnu_missing_equal_designator, EXTENSION, |
| "use of GNU 'missing =' extension in designator") |
| DIAG(ext_gnu_old_style_field_designator, EXTENSION, |
| "use of GNU old-style field designator extension") |
| DIAG(ext_gnu_case_range, EXTENSION, |
| "use of GNU case range extension") |
| |
| // Generic errors. |
| DIAG(err_parse_error, ERROR, |
| "parse error") |
| DIAG(err_expected_expression, ERROR, |
| "expected expression") |
| DIAG(err_expected_external_declaration, ERROR, |
| "expected external declaration") |
| DIAG(err_expected_ident, ERROR, |
| "expected identifier") |
| DIAG(err_expected_ident_lparen, ERROR, |
| "expected identifier or '('") |
| DIAG(err_expected_ident_lbrace, ERROR, |
| "expected identifier or '{'") |
| DIAG(err_expected_rparen, ERROR, |
| "expected ')'") |
| DIAG(err_expected_rsquare, ERROR, |
| "expected ']'") |
| DIAG(err_expected_rbrace, ERROR, |
| "expected '}'") |
| DIAG(err_expected_greater, ERROR, |
| "expected '>'") |
| DIAG(err_expected_semi_decl_list, ERROR, |
| "expected ';' at end of declaration list") |
| DIAG(ext_expected_semi_decl_list, EXTENSION, |
| "expected ';' at end of declaration list") |
| DIAG(err_expected_fn_body, ERROR, |
| "expected function body after function declarator") |
| DIAG(err_expected_after_declarator, ERROR, |
| "expected '=', ',', ';', 'asm', or '__attribute__' after declarator") |
| DIAG(err_expected_statement, ERROR, |
| "expected statement") |
| DIAG(err_expected_lparen_after, ERROR, |
| "expected '(' after '%0'") |
| DIAG(err_expected_less_after, ERROR, |
| "expected '<' after '%0'") |
| DIAG(err_expected_comma, ERROR, |
| "expected ','") |
| DIAG(err_expected_lbrace_in_compound_literal, ERROR, |
| "expected '{' in compound literal") |
| DIAG(err_expected_while, ERROR, |
| "expected 'while' in do/while loop") |
| DIAG(err_expected_semi_after, ERROR, |
| "expected ';' after %0") |
| DIAG(err_expected_semi_after_expr, ERROR, |
| "expected ';' after expression") |
| DIAG(err_expected_semi_for, ERROR, |
| "expected ';' in 'for' statement specifier") |
| DIAG(err_expected_colon_after, ERROR, |
| "expected ':' after %0") |
| DIAG(err_label_end_of_compound_statement, ERROR, |
| "label at end of compound statement: expected statement") |
| DIAG(err_expected_colon, ERROR, |
| "expected ':'") |
| DIAG(err_expected_string_literal, ERROR, |
| "expected string literal") |
| DIAG(err_expected_asm_operand, ERROR, |
| "expected string literal or '[' for asm operand") |
| |
| DIAG(err_unexpected_at, ERROR, |
| "unexpected '@' in program") |
| |
| /// err_matching - this is used as a continuation of a previous error, e.g. to |
| /// specify the '(' when we expected a ')'. This should probably be some |
| /// special sort of diagnostic kind to indicate that it is the second half of |
| /// the previous diagnostic. |
| DIAG(err_matching, ERROR, |
| "to match this '%0'") |
| |
| //===----------------------------------------------------------------------===// |
| // Semantic Analysis |
| //===----------------------------------------------------------------------===// |
| |
| // Semantic analysis of string and character constant literals. |
| DIAG(ext_nonstandard_escape, EXTENSION, |
| "use of non-standard escape character '\\%0'") |
| DIAG(ext_unknown_escape, EXTENSION, |
| "unknown escape sequence '\\%0'") |
| DIAG(warn_extraneous_wide_char_constant, WARNING, |
| "extraneous characters in wide character constant ignored") |
| DIAG(warn_char_constant_too_large, WARNING, |
| "character constant too long for its type") |
| DIAG(warn_hex_escape_too_large, WARNING, |
| "hex escape sequence out of range") |
| DIAG(warn_octal_escape_too_large, WARNING, |
| "octal escape sequence out of range") |
| |
| DIAG(err_hex_escape_no_digits, ERROR, |
| "\\x used with no following hex digits") |
| |
| // Declarations. |
| DIAG(err_typename_requires_specqual, ERROR, |
| "type name requires a specifier or qualifier") |
| DIAG(err_typename_invalid_storageclass, ERROR, |
| "type name does not allow storage class to be specified") |
| DIAG(err_typename_invalid_functionspec, ERROR, |
| "type name does not allow function specifier to be specified") |
| DIAG(err_invalid_decl_spec_combination, ERROR, |
| "cannot combine with previous '%0' declaration specifier") |
| DIAG(err_invalid_sign_spec, ERROR, |
| "'%0' cannot be signed or unsigned") |
| DIAG(err_invalid_short_spec, ERROR, |
| "'short %0' is invalid") |
| DIAG(err_invalid_long_spec, ERROR, |
| "'long %0' is invalid") |
| DIAG(err_invalid_longlong_spec, ERROR, |
| "'long long %0' is invalid") |
| DIAG(err_invalid_complex_spec, ERROR, |
| "'_Complex %0' is invalid") |
| DIAG(err_invalid_thread_spec, ERROR, |
| "'__thread %0' is invalid") |
| DIAG(err_ellipsis_first_arg, ERROR, |
| "ISO C requires a named argument before '...'") |
| DIAG(err_unspecified_vla_size_with_static, ERROR, |
| "'static' may not be used with an unspecified variable length array size") |
| DIAG(err_invalid_storage_class_in_func_decl, ERROR, |
| "invalid storage class specifier in function declarator") |
| DIAG(err_invalid_reference_qualifier_application, ERROR, |
| "'%0' qualifier may not be applied to a reference") |
| |
| // Attributes |
| DIAG(err_attribute_wrong_number_arguments, ERROR, |
| "attribute requires %0 argument(s)") |
| DIAG(err_attribute_invalid_vector_type, ERROR, |
| "invalid vector type '%0'") |
| DIAG(err_attribute_vector_size_not_int, ERROR, |
| "vector_size requires integer constant") |
| DIAG(err_attribute_invalid_size, ERROR, |
| "vector size not an integral multiple of component size") |
| DIAG(err_attribute_zero_size, ERROR, |
| "zero vector size") |
| DIAG(err_typecheck_vector_not_convertable, ERROR, |
| "can't convert between vector values of different size ('%0' and '%1')") |
| |
| // Function Parameter Semantic Analysis. |
| DIAG(err_void_param_with_identifier, ERROR, |
| "void argument may not have a name") |
| DIAG(err_void_only_param, ERROR, |
| "'void' must be the first and only parameter if specified") |
| DIAG(err_void_param_qualified, ERROR, |
| "'void' as parameter must not have type qualifiers") |
| DIAG(err_param_redefinition, ERROR, |
| "redefinition of parameter '%0'") |
| DIAG(err_ident_list_in_fn_declaration, ERROR, |
| "a parameter list without types is only allowed in a function definition") |
| DIAG(err_declaration_does_not_declare_param, ERROR, |
| "declaration does not declare a parameter") |
| DIAG(err_no_matching_param, ERROR, |
| "parameter named '%0' is missing") |
| DIAG(ext_param_not_declared, EXTENSION, |
| "parameter '%0' was not declared, defaulting to type 'int'") |
| |
| DIAG(err_previous_definition, ERROR, |
| "previous definition is here") |
| DIAG(err_previous_use, ERROR, |
| "previous use is here") |
| |
| DIAG(err_unexpected_typedef, ERROR, |
| "unexpected type name '%0': expected expression") |
| DIAG(err_undeclared_var_use, ERROR, |
| "use of undeclared identifier '%0'") |
| DIAG(err_redefinition, ERROR, |
| "redefinition of '%0'") |
| DIAG(err_redefinition_different_kind, ERROR, |
| "redefinition of '%0' as different kind of symbol") |
| DIAG(err_nested_redefinition, ERROR, |
| "nested redefinition of '%0'") |
| DIAG(err_use_with_wrong_tag, ERROR, |
| "use of '%0' with tag type that does not match previous declaration") |
| DIAG(ext_forward_ref_enum, EXTENSION, |
| "ISO C forbids forward references to 'enum' types") |
| DIAG(err_redefinition_of_enumerator, ERROR, |
| "redefinition of enumerator '%0'") |
| DIAG(err_duplicate_member, ERROR, |
| "duplicate member '%0'") |
| DIAG(err_enum_value_not_integer_constant_expr, ERROR, |
| "enumerator value for '%0' is not an integer constant") |
| DIAG(err_case_label_not_integer_constant_expr, ERROR, |
| "case label does not reduce to an integer constant") |
| DIAG(err_typecheck_illegal_vla, ERROR, |
| "variable length array declared outside of any function") |
| DIAG(err_typecheck_negative_array_size, ERROR, |
| "array size is negative") |
| DIAG(err_typecheck_zero_array_size, EXTENSION, |
| "zero size arrays are an extension") |
| DIAG(err_array_size_non_int, ERROR, |
| "size of array has non-integer type '%0'") |
| |
| DIAG(err_redefinition_of_label, ERROR, |
| "redefinition of label '%0'") |
| DIAG(err_undeclared_label_use, ERROR, |
| "use of undeclared label '%0'") |
| |
| DIAG(warn_implicit_function_decl, WARNING, |
| "implicit declaration of function '%0'") |
| DIAG(ext_implicit_function_decl, EXTENSION, |
| "implicit declaration of function '%0' is invalid in C99") |
| |
| DIAG(err_field_declared_as_function, ERROR, |
| "field '%0' declared as a function") |
| DIAG(err_field_incomplete, ERROR, |
| "field '%0' has incomplete type") |
| DIAG(err_variable_sized_type_in_struct, EXTENSION, |
| "variable sized type '%0' must be at end of struct or class") |
| DIAG(err_flexible_array_empty_struct, ERROR, |
| "flexible array '%0' not allowed in otherwise empty struct") |
| DIAG(ext_flexible_array_in_struct, EXTENSION, |
| "'%0' may not be nested in a struct due to flexible array member") |
| DIAG(err_flexible_array_in_array, ERROR, |
| "'%0' may not be used as an array element due to flexible array member") |
| DIAG(err_illegal_decl_array_of_functions, ERROR, |
| "'%0' declared as array of functions") |
| DIAG(err_illegal_decl_array_incomplete_type, ERROR, |
| "array has incomplete element type '%0'") |
| DIAG(err_illegal_decl_array_of_references, ERROR, |
| "'%0' declared as array of references") |
| DIAG(err_illegal_decl_pointer_to_reference, ERROR, |
| "'%0' declared as a pointer to a reference") |
| DIAG(err_illegal_decl_reference_to_reference, ERROR, |
| "'%0' declared as a reference to a reference") |
| |
| // Expressions. |
| DIAG(ext_sizeof_function_type, EXTENSION, |
| "invalid application of 'sizeof' to a function type") |
| DIAG(ext_sizeof_void_type, EXTENSION, |
| "invalid application of '%0' to a void type") |
| DIAG(err_sizeof_incomplete_type, ERROR, |
| "invalid application of 'sizeof' to an incomplete type '%0'") |
| DIAG(err_alignof_incomplete_type, ERROR, |
| "invalid application of '__alignof' to an incomplete type '%0'") |
| DIAG(err_invalid_suffix_integer_constant, ERROR, |
| "invalid suffix '%0' on integer constant") |
| DIAG(err_invalid_suffix_float_constant, ERROR, |
| "invalid suffix '%0' on floating constant") |
| DIAG(warn_integer_too_large, WARNING, |
| "integer constant is too large for its type") |
| DIAG(warn_integer_too_large_for_signed, WARNING, |
| "integer constant is so large that it is unsigned") |
| DIAG(err_exponent_has_no_digits, ERROR, |
| "exponent has no digits") |
| DIAG(ext_binary_literal, EXTENSION, |
| "binary integer literals are an extension") |
| DIAG(err_invalid_binary_digit, ERROR, |
| "invalid digit '%0' in binary constant") |
| DIAG(err_invalid_octal_digit, ERROR, |
| "invalid digit '%0' in octal constant") |
| DIAG(err_invalid_decimal_digit, ERROR, |
| "invalid digit '%0' in decimal constant") |
| DIAG(err_hexconstant_requires_exponent, ERROR, |
| "hexadecimal floating constants require an exponent") |
| DIAG(err_typecheck_subscript_value, ERROR, |
| "subscripted value is neither array nor pointer") |
| DIAG(err_typecheck_subscript, ERROR, |
| "array subscript is not an integer") |
| DIAG(err_typecheck_subscript_not_object, ERROR, |
| "illegal subscript of non-object type '%0'") |
| DIAG(err_typecheck_member_reference_structUnion, ERROR, |
| "member reference is not to a structure or union") |
| DIAG(err_typecheck_member_reference_arrow, ERROR, |
| "member reference is not a pointer") |
| DIAG(err_typecheck_incomplete_tag, ERROR, |
| "incomplete definition of type '%0'") |
| DIAG(err_typecheck_no_member, ERROR, |
| "no member named '%0'") |
| DIAG(err_typecheck_illegal_increment_decrement, ERROR, |
| "cannot modify value of type '%0'") |
| DIAG(err_typecheck_invalid_lvalue_incr_decr, ERROR, |
| "invalid lvalue in increment/decrement expression") |
| DIAG(err_typecheck_arithmetic_incomplete_type, ERROR, |
| "arithmetic on pointer to incomplete type '%0'") |
| DIAG(err_typecheck_decl_incomplete_type, ERROR, |
| "variable has incomplete type '%0'") |
| DIAG(err_typecheck_sclass_fscope, ERROR, |
| "illegal storage class on file-scoped variable") |
| DIAG(err_typecheck_sclass_func, ERROR, |
| "illegal storage class on function") |
| DIAG(err_typecheck_address_of_register, ERROR, |
| "address of register variable requested") |
| DIAG(err_typecheck_invalid_lvalue_addrof, ERROR, |
| "invalid lvalue in address expression") |
| DIAG(err_typecheck_unary_expr, ERROR, |
| "invalid argument type to unary expression '%0'") |
| DIAG(err_typecheck_indirection_requires_pointer, ERROR, |
| "indirection requires pointer operand ('%0' invalid)") |
| DIAG(err_typecheck_deref_incomplete_type, ERROR, |
| "dereferencing pointer to incomplete type '%0'") |
| DIAG(ext_typecheck_deref_ptr_to_void, EXTENSION, |
| "dereferencing '%0' pointer") |
| DIAG(err_typecheck_invalid_operands, ERROR, |
| "invalid operands to binary expression ('%0' and '%1')") |
| DIAG(ext_typecheck_comparison_of_pointer_integer, EXTENSION, |
| "comparison between pointer and integer") |
| DIAG(err_typecheck_assign_const, ERROR, |
| "read-only variable is not assignable") |
| DIAG(err_typecheck_assign_incompatible, ERROR, |
| "incompatible types assigning '%1' to '%0'") |
| DIAG(ext_typecheck_assign_pointer_int, EXTENSION, |
| "incompatible types assigning '%1' to '%0'") |
| DIAG(ext_typecheck_assign_incompatible_pointer, EXTENSION, |
| "incompatible pointer types assigning '%1' to '%0'") |
| DIAG(ext_typecheck_assign_discards_qualifiers, EXTENSION, |
| "assigning '%1' to '%0' discards qualifiers") |
| DIAG(err_typecheck_array_not_modifiable_lvalue, ERROR, |
| "array type '%0' is not assignable") |
| DIAG(err_typecheck_non_object_not_modifiable_lvalue, ERROR, |
| "non-object type '%0' is not assignable") |
| DIAG(err_typecheck_expression_not_modifiable_lvalue, ERROR, |
| "expression is not assignable") |
| DIAG(err_typecheck_incomplete_type_not_modifiable_lvalue, ERROR, |
| "incomplete type '%0' is not assignable") |
| DIAG(err_typecheck_call_not_function, ERROR, |
| "called object is not a function or function pointer") |
| DIAG(err_typecheck_call_too_few_args, ERROR, |
| "too few arguments to function") |
| DIAG(err_typecheck_call_too_many_args, ERROR, |
| "too many arguments to function") |
| DIAG(err_typecheck_passing_incompatible, ERROR, |
| "incompatible types passing '%0' to function expecting '%1'") |
| DIAG(ext_typecheck_passing_incompatible_pointer, EXTENSION, |
| "incompatible pointer types passing '%0' to function expecting '%1'") |
| DIAG(ext_typecheck_passing_pointer_int, EXTENSION, |
| "incompatible types passing '%1' to function expecting '%0'") |
| DIAG(ext_typecheck_passing_discards_qualifiers, EXTENSION, |
| "passing '%0' to '%1' discards qualifiers") |
| DIAG(err_typecheck_cond_expect_scalar, ERROR, |
| "used type '%0' where arithmetic or pointer type is required") |
| DIAG(err_typecheck_cond_incompatible_operands, ERROR, |
| "incompatible operand types ('%0' and '%1')") |
| DIAG(ext_typecheck_cond_incompatible_pointers, EXTENSION, |
| "pointer type mismatch ('%0' and '%1')") |
| |
| DIAG(warn_unused_expr, WARNING, |
| "expression result unused") |
| |
| // Statements. |
| DIAG(err_continue_not_in_loop, ERROR, |
| "'continue' statement not in loop statement") |
| DIAG(err_break_not_in_loop_or_switch, ERROR, |
| "'break' statement not in loop or switch statement") |
| DIAG(err_typecheck_return_incompatible, ERROR, |
| "incompatible type returning '%1', expected '%0'") |
| DIAG(ext_typecheck_return_pointer_int, EXTENSION, |
| "incompatible type returning '%1', expected '%0'") |
| DIAG(ext_typecheck_return_incompatible_pointer, EXTENSION, |
| "incompatible pointer type returning '%1', expected '%0'") |
| DIAG(ext_typecheck_return_discards_qualifiers, EXTENSION, |
| "returning '%1' from function expecting '%0' discards qualifiers") |
| DIAG(err_typecheck_statement_requires_scalar, ERROR, |
| "statement requires expression of scalar type ('%0' invalid)") |
| |
| DIAG(warn_return_missing_expr, WARNING, |
| "non-void function '%0' should return a value") |
| DIAG(ext_return_missing_expr, EXTENSION, |
| "non-void function '%0' should return a value") |
| DIAG(ext_return_has_expr, EXTENSION, |
| "void function '%0' should not return a value") |
| |
| #undef DIAG |