📄 message.h
字号:
/* * C compiler * ========== * * Copyright 1996 Keith Walker & Dave Walker * Credits to Matthew Brandt. * All commercial rights reserved. * * This compiler may be redistributed as long there is no * commercial interest. The compiler must not be redistributed * without its full sources. This notice must stay intact. * * This file contains the various definitions for the messages used * within the compiler. By including this file into a source file with * suitable definitions for the MSG() macro it can be used to define * the various structures needed to access the messages. *//* * Parsing Error messages */#ifndef SYNTAX_CORRECT MSG (ERR_ADDREGVAR, err_addregvar, "& operator on register variable '%s'") MSG (ERR_ARG, err_arg, "declared argument '%s' missing") MSG (ERR_ARITHMETIC, err_arithmetic, "arithmetic type expected") MSG (ERR_ARRAYRETURN, err_arrayreturn, "function returning array type") MSG (ERR_BINARYEXP, err_binaryexp, "no binary exponent") MSG (ERR_BITFIELD, err_bitfield, "& operator may not be applied to bitfields") MSG (ERR_BRACE, err_brace, "'{' expected on initialiser") MSG (ERR_BREAK, err_break, "break not allowed here") MSG (ERR_CASE, err_case, "case not allowed here") MSG (ERR_CAST, err_cast, "error doing a cast") MSG (ERR_CHARCONST, err_charconst, "character constant unterminated or too long") MSG (ERR_CONST, err_const, "modified 'const' value") MSG (ERR_CONSTEXPR, err_constexpr, "constant expression expected") MSG (ERR_CONSTFLOAT, err_constfloat, "floating point constant expected") MSG (ERR_CONSTINT, err_constint, "constant integer expression expected") MSG (ERR_CONT, err_cont, "continue not allowed here") MSG (ERR_COUNTPARAM, err_countparam, "parameter count incorrect for function %s") MSG (ERR_DEREF, err_deref, "error dereferencing a pointer") MSG (ERR_DUPCASE, err_dupcase, "duplicate case label 'case %ld'") MSG (ERR_DUPDEFAULT, err_dupdefault, "duplicate 'default' label") MSG (ERR_DUPLABEL, err_duplabel, "duplicate label '%s'") MSG (ERR_ENUMWRAP, err_enumwrap, "enumeration constant too large") MSG (ERR_EOF, err_eof, "unexpected end of file") MSG (ERR_ESCRANGE, err_escrange, "value of escape sequence out of valid range")
MSG (ERR_EXPREXPECT, err_exprexpect, "expression expected") MSG (ERR_FLDTYPE, err_fldtype, "bit field type should be unsigned or int") MSG (ERR_FUNC, err_func, "function declarator not allowed here") MSG (ERR_FUNCID, err_funcid, "'__func__' can only be used within a function definition") MSG (ERR_IDEXPECT, err_idexpect, "identifier expected") MSG (ERR_IDLIST, err_idlist, "identifier list not allowed on function declaration") MSG (ERR_ILLCAST, err_illcast, "illegal cast from '%s' to '%s'") MSG (ERR_ILLCHAR, err_illchar, "illegal character '%c'") MSG (ERR_ILLCLASS, err_illclass, "illegal storage class") MSG (ERR_ILLINIT, err_illinit, "illegal initialisation") MSG (ERR_ILLINLINE, err_illinline, "illegal function specifier")
MSG (ERR_ILLSIZEOF, err_illsizeof, "illegal 'sizeof' operation") MSG (ERR_ILLTYPE, err_illtype, "illegal type combination")#ifdef TYPEOF MSG (ERR_ILLTYPEOF, err_illtypeof, "illegal 'typeof' operation")#endif /* TYPEOF */ MSG (ERR_ILLXCHAR, err_illxchar, "illegal unprintable character (value=0x%x)") MSG (ERR_IMPLICITADDR, err_implicitaddr, "implicit conversion to pointer on register variable '%s'") MSG (ERR_IMPLICITINT, err_implicitint, "implict 'int'") MSG (ERR_INCOMPLETE, err_incomplete, "incomplete '%s' declaration") MSG (ERR_INLINE, err_inline, "'inline' only allowed on functions")
MSG (ERR_INLINEMAIN, err_inlinemain, "'inline' not allowed on 'main()'") MSG (ERR_INITSIZE, err_initsize, "too many initialisers") MSG (ERR_INTEGER, err_integer, "integral type expected") MSG (ERR_LINKAGE, err_linkage, "extern definition of '%s' redeclared static") MSG (ERR_LVALUE, err_lvalue, "l-value required") MSG (ERR_MINUS, err_minus, "cannot subtract a pointer from an integral value") MSG (ERR_MISMATCH, err_mismatch, "type mismatch error") MSG (ERR_NESTED, err_nested, "cannot nest function definition '%s()'") MSG (ERR_NOARRAY, err_noarray, "array type expected")
#ifndef FLOAT_SUPPORT MSG (ERR_NOFLOATSUPPORT, err_nofloatsupport, "floating point support not available")
#endif /* FLOAT_SUPPORT */
MSG (ERR_NOFUNC, err_nofunc, "function type expected") MSG (ERR_NOINIT, err_noinit, "initialisation invalid") #ifndef LONGLONG_SUPPORT
MSG (ERR_NOLONGLONGSUPPORT, err_nolonglongsupport, "long long support not available")
#endif /* LONGLONG_SUPPORT */ MSG (ERR_NOMEMBER, err_nomember, "'%s' is not a struct/union member") MSG (ERR_NOPOINTER, err_nopointer, "pointer type expected") MSG (ERR_OBJECT, err_object, "an object type expected") MSG (ERR_PARMS, err_parms, "error while scanning a parameter list") MSG (ERR_PREPROC, err_preproc, "problem with pre-processor output") MSG (ERR_PROTO, err_proto, "function '%s()' prototype mismatch") MSG (ERR_PROTODEF, err_protodef, "function '%s()' default promotion / prototype mismatch") MSG (ERR_PROTONUM, err_protonum, "function '%s()' mismatched number of arguments") MSG (ERR_PUNCT, err_punct, "unexpected symbol '%s' found") MSG (ERR_QUAL, err_qual, "qualifier mismatch") MSG (ERR_QUALIFIER, err_qualifier, "qualifier already specified") MSG (ERR_REDECL, err_redecl, "illegal redeclaration of '%s'") MSG (ERR_REPRESENT, err_represent, "constant expression exceeds representable range of type '%s'") MSG (ERR_RESTRICT, err_restrict, "'restrict' only allowed on pointer types") MSG (ERR_SCALAR, err_scalar, "scalar type expected") MSG (ERR_SIZE, err_size, "type/operand has unknown size") MSG (ERR_STATIC, err_static, "function '%s' declared but never defined") MSG (ERR_STRINGCONST, err_stringconst, "string constant unterminated or too long") MSG (ERR_TAG, err_tag, "tag usage '%s' mismatch") MSG (ERR_TYPE, err_type, "type specifier '%s' already specified") MSG (ERR_UNDEFINED, err_undefined, "undefined identifier '%s'") MSG (ERR_UNDEFINEDFN, err_undefinedfn, "implicit defintion of function 'int %s()' not allowed") MSG (ERR_UNDEFLAB, err_undeflab, "undefined label '%s'") MSG (ERR_VALRETURN, err_valreturn, "no value specified in 'return' statement") MSG (ERR_VARRAY, err_varray, "variable length array not allowed") MSG (ERR_VOIDFUNC, err_voidfunc, "return value specified to void function") MSG (ERR_VOIDPARM, err_voidparm, "void parameter is passed to function %s") MSG (ERR_VOIDRETURN, err_voidreturn, "return expression of type void") MSG (ERR_WIDTH, err_width, "illegal field width")/* * Error/Warning messages are ordered in order of increasing severity * If they are to be treated as errors or merely warnings is controlled * by the current setting of the error_option. For warnings, whether * they are to be output at all is controlled by warn_option. *//* * Level 1 * This is the most severe level of warnings. These should * not be suppressed unless one is certain that is OK. */ MSG (WARN_COUNTPARAM, warn_countparam, "parameter count incorrect for function %s") MSG (WARN_EXTERN, warn_extern, "extern definition of '%s' redeclared static") MSG (WARN_FLDTYPE, warn_fldtype, "bit field type should be unsigned or int") MSG (WARN_TYPEDEF, warn_typedef, "typedef has no name")/* * Level 2 * Default warning level. These should normally be fixed. * Typically this just requires a cast or something similar. */ MSG (WARN_FORMATEND, warn_formatend, "format string for '%s()' incorrect") MSG (WARN_NOHEX, warn_nohex, "\\x not followed by any hex characters") MSG (WARN_PARAMSIZE, warn_paramsize, "size of parameter %d changed by prototype on function %s") MSG (WARN_REPRESENT, warn_represent, "case label value %ld exceeds representable range of switch control expression type '%s'") MSG (WARN_SIZEOF0, warn_sizeof0, "'sizeof' value is zero") MSG (WARN_SIZEOFBIG, warn_sizeofbig, "'sizeof' value %ld is greater than '65535'") MSG (WARN_TYPECAST, warn_typecast, "conversion between incompatible types '%s' and '%s'")/*
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -