messages.gml

来自「开放源码的编译器open watcom 1.6.0版的源代码」· GML 代码 · 共 2,168 行 · 第 1/5 页

GML
2,168
字号
constructor is declared if a class does not define a copy constructor.
If a default argument is added later on to a constructor that makes it
a copy constructor, an ambiguity results.
:errbad.
struct S {
    S( S const &, int );
    // S( S const & );  <-- declared by compiler
};
// ambiguity with compiler
// generated copy constructor
// S( S const & );
S::S( S const &, int = 0 )
{
}
:eerrbad.

:MSGSYM. ERR_MISPLACED_SHARP_SHARP
:MSGTXT. ## must not be at start or end of replacement tokens
:MSGJTXT. ##偼抲偒姺偊僩乕僋儞偺愭摢傑偨偼嵟屻偵偁偭偰偼側傝傑偣傫
There must be a token on each side of the "##" (token pasting) operator.
:errbad.
#define badmac( a, b ) ## a ## b
:eerrbad.

:MSGSYM. ERR_INVALID_FLOATING_POINT_CONSTANT
:MSGTXT. invalid floating-point constant
:MSGJTXT. 晄揔愗側晜摦彫悢揰掕悢偱偡
The exponent part of the floating-point constant is not formed correctly.
:errbad.
float f = 123.9E+Q;
:eerrbad.

:MSGSYM. ERR_CANT_TAKE_SIZEOF_FIELD
:MSGTXT. 'sizeof' is not allowed for a bit-field
:MSGJTXT. 'sizeof'偼價僢僩僼傿乕儖僪偵懳偟偰偼巊偊傑偣傫
The smallest object that you can ask for the size of is a char.
:errbad.
struct S
{   int a;
    int b :10;
} v;
int k = sizeof( v.b );
:eerrbad.

:MSGSYM. ERR_INVALID_OPTION_PATH
:MSGTXT. option requires a path
:MSGJTXT. 僆僾僔儑儞偵偼僷僗偑昁梫偱偡
The specified option is not recognized by the compiler
since there was no path after it (i.e., "-i=d:\include;d:\path" ).

:MSGSYM. ERR_MUST_BE_VAR_PARM_FUNC
:MSGTXT. must use 'va_start' macro inside function with variable arguments
:MSGJTXT. 'va_start'儅僋儘偼壜曄屄偺堷悢傪帩偭偨娭悢偺拞偱巊傢側偗傟偽側傝傑偣傫
The
.id va_start
macro is used to setup access to the parameters in a function
that takes a variable number of parameters.
A function is defined with a variable number of parameters by declaring
the last parameter in the function as "...".
:errbad.
#include <stdarg.h>
int foo( int a, int b )
{
    va_list args;
    va_start( args, a );
    va_end( args );
    return b;
}
:eerrbad.

:MSGSYM. ERR_FATAL_ERROR
:MSGTXT. ***FATAL*** %s
:MSGJTXT. ***抳柦揑*** %s
A fatal error has been detected during code generation time.
The type of error is displayed in the message.

:MSGSYM. ERR_BACK_END_ERROR
:MSGTXT. internal compiler error %d
:MSGJTXT. 僐儞僷僀儔撪晹僄儔乕 %d
A bug has been encountered in the compiler.
Please report the specified internal compiler error number and any other
helpful details about the program being compiled to the Open Watcom
development team so that we
can fix the problem. See http://www.openwatcom.org/.

:MSGSYM. ERR_BAD_PARM_REGISTER
:MSGTXT. argument number %d - invalid register in #pragma
:MSGJTXT. 堷悢斣崋%d - #pragma偺拞偺晄揔愗側儗僕僗僞巜掕
The designated registers cannot hold the value for the parameter.

:MSGSYM. ERR_BAD_RETURN_REGISTER
:MSGTXT. procedure '%s' has invalid return register in #pragma
:MSGJTXT. 僾儘僔乕僕儍'%s'偼丆#pragma偺拞偱晄揔愗側儕僞乕儞丒儗僕僗僞偑巜掕偝傟偰偄傑偡
The size of the return register does not match the size of the result
returned by the function.

:MSGSYM. ERR_BAD_SAVE
:MSGTXT. illegal register modified by '%s' #pragma
:MSGJTXT. '%s'#pragma偵傛偭偰堘朄側儗僕僗僞偑廋惓偝傟偰偄傑偡
.us For the 16-bit Open Watcom C/C++ compiler:
The BP, CS, DS, and SS registers cannot be modified in small data models.
The BP, CS, and SS registers cannot be modified in large data models.
.np
.us For the 32-bit Open Watcom C/C++ compiler:
The EBP, CS, DS, ES, and SS registers cannot be modified in flat
memory models.
The EBP, CS, DS, and SS registers cannot be modified in small data
models.
The EBP, CS, and SS registers cannot be modified in large data models.

:MSGSYM. ANSIERR_NO_EXTERNAL_DEFNS_FOUND
:MSGTXT. file must contain at least one external definition
:MSGJTXT. 僼傽僀儖偼彮偔偲傕1偮偺奜晹掕媊傪娷傑側偗傟偽側傝傑偣傫
:ANSIERR.
Every file must contain at least one global object, (either a data variable
or a function).
.np
Note: This message has been disabled starting with Open Watcom v1.4. The
ISO 1998 C++ standard allows empty translation units.

:MSGSYM. ERR_OUT_OF_MACRO_MEMORY
:MSGTXT. out of macro space
:MSGJTXT. 儅僋儘嬻娫偑晄懌偱偡
The compiler ran out of memory for storing macro definitions.

:MSGSYM. ERR_BREAK_KEY_HIT
:MSGTXT. keyboard interrupt detected
:MSGJTXT. 僉乕儃乕僪妱傝崬傒偑専弌偝傟傑偟偨
The compilation has been aborted with Ctrl/C or Ctrl/Break.

:MSGSYM. ERR_DUPLICATE_MACRO_PARM
:MSGTXT. duplicate macro parameter '%s'
:MSGJTXT. 儅僋儘僷儔儊乕僞'%s'偑2偮偁傝傑偡
The parameters specified in a macro definition must be unique.
:errbad.
#define badmac( a, b, a ) a ## b
:eerrbad.

:MSGSYM. ERR_UNABLE_TO_OPEN_WORK_FILE
:MSGTXT. unable to open work file: error code = %d
:MSGJTXT. 儚乕僋丒僼傽僀儖傪僆乕僾儞偡傞偙偲偑偱偒傑偣傫丗僄儔乕僐乕僪 = %d
The compiler tries to open a new work file by the name "__wrkN__.tmp" where
N is the digit 0 to 9.
This message will be issued if all of those files already exist.

:MSGSYM. ERR_WORK_FILE_WRITE_ERROR
:MSGTXT. write error on work file: error code = %d
:MSGJTXT. 儚乕僋丒僼傽僀儖偺彂崬傒僄儔乕丗僄儔乕僐乕僪 = %d
An error was encountered trying to write information to the work file.
The disk could be full.

:MSGSYM. ERR_WORK_FILE_READ_ERROR
:MSGTXT. read error on work file: error code = %d
:MSGJTXT. 儚乕僋丒僼傽僀儖偺撉庢傝僄儔乕丗僄儔乕僐乕僪 = %d
An error was encountered trying to read information from the work file.

:MSGSYM. ERR_TOKEN_TRUNCATED
:MSGTXT. token too long; truncated
:MSGJTXT. 僩乕僋儞偑挿偡偓傑偡丟愗傝媗傔傜傟傑偡
The token must be less than 510 bytes in length.

:MSGSYM. ERR_FILENAME_REQUIRED
:MSGTXT. filename required on command line
:MSGJTXT. 僐儅儞僪丒儔僀儞忋偱僼傽僀儖柤偺巜掕偑昁梫偱偡
The name of a file to be compiled must be specified on the command line.

:MSGSYM. ERR_CAN_ONLY_COMPILE_ONE_FILE
:MSGTXT. command line contains more than one file to compile
:MSGJTXT. 僐儅儞僪丒儔僀儞偵偼僐儞僷僀儖偡傞2偮埲忋偺僼傽僀儖偑偁傝傑偡
You have more than one file name specified on the command line to be
compiled.
The compiler can only compile one file at a time.
You can use the &wclname. utility to compile multiple files with a
single command.

:MSGSYM. ERR_UNION_NO_VIRTUAL_FUNCTIONS
:MSGTXT. virtual member functions are not allowed in a union
:MSGJTXT. 壖憐儊儞僶娭悢偼union偺拞偱嫋偝傟傑偣傫
A union can only be used to overlay the storage of data.
The storage of virtual function
information (in a safe manner) cannot be done if storage is overlaid.
:errbad.
struct S1{ int f( int ); };
struct S2{ int f( int ); };
union un { S1 s1;
       S2 s2;
       virtual int vf( int );
     };
:eerrbad.

:MSGSYM. ERR_UNION_CANNOT_BE_BASE
:MSGTXT. union cannot be used as a base class
:MSGJTXT. union偼婎掙僋儔僗偲偟偰巊偊傑偣傫
This restriction prevents C++ programmers from viewing a
.kw union
as an encapsulation unit.
If it is necessary, one can encapsulate the union into a
.kw class
and achieve the same effect.
:errbad.
union U { int a; int b; };
class S : public U { int s; };
:eerrbad.

:MSGSYM. ERR_UNION_CANNOT_HAVE_BASE
:MSGTXT. union cannot have a base class
:MSGJTXT. union偼婎掙僋儔僗傪帩偮偙偲偑偱偒傑偣傫
This restriction prevents C++ programmers from viewing a
.kw union
as an encapsulation unit.
If it is necessary, one can encapsulate the union into a
.kw class
and inherit the base classes normally.
:errbad.
class S { public: int s; };
union U : public S { int a; int b; };
:eerrbad.

:MSGSYM. ERR_CANNOT_INHERIT_UNDEFINED
:MSGTXT. cannot inherit an undefined base class '%T'
:MSGJTXT. 枹掕媊婎掙僋儔僗'%T'傪庴偗宲偖偙偲偼偱偒傑偣傫
The storage requirements for a
.kw class
type must be known when inheritance is involved because
the layout of the final class depends on knowing the complete
contents of all base classes.
:errbad.
class Undefined;
class C : public Undefined {
    int c;
};
:eerrbad.

:MSGSYM. ERR_REPEATED_BASE_CLASS
:MSGTXT. repeated direct base class will cause ambiguities
:MSGJTXT. 孞傝曉偝傟偨捈愙偺儀乕僗僋儔僗偑濨枂偝傪堷偒婲偙偟偰偄傑偡
Almost all accesses will be ambiguous.  This restriction
is useful in catching programming errors.  The repeated base class
can be encapsulated in another class if the repetition is required.
:errbad.
class Dup
{
    int d;
};
class C : public Dup, public Dup
{
    int c;
};
:eerrbad.

:MSGSYM. ERR_ONLY_GLOBAL_TEMPLATES
:MSGTXT. templates may only be declared in namespace scope
:MSGJTXT. 僥儞僾儗乕僩偼僼傽僀儖丒僗僐乕僾偺拞偱愰尵偝傟傞偩偗偱偡
Currently, templates can only be declared in namespace scope.
This simple restriction was chosen in favour of more freedom with
possibly subtle restrictions.

:MSGSYM. ERR_ONLY_GLOBAL_LINKAGES
:MSGTXT. linkages may only be declared in file scope
:MSGJTXT. 儕儞僋偼僼傽僀儖丒僗僐乕僾偺拞偱愰尵偝傟傞偩偗偱偡
A common source of errors for C and C++ result from the use of prototypes
inside of functions.  This restriction attempts to prevent
such errors.

:MSGSYM. ERR_UNKNOWN_LINKAGE
:MSGTXT. unknown linkage '%s'
:MSGJTXT. 枹抦偺儕儞僋'%s'偱偡
Only the linkages "C" and "C++" are supported by Open Watcom C++.
:errbad.
extern "APL" void AplFunc( int* );
:eerrbad.

:MSGSYM. ERR_TOO_MANY_SC_SPECIFIERS
:MSGTXT. too many storage class specifiers
:MSGJTXT. 婰壇僋儔僗巜掕巕偑懡偡偓傑偡
This message is a result of duplicating a previous storage class or
having a different storage class.
You can only have one of the following storage classes,
.kw extern,
.kw static,
.kw auto,
.kw register,
or
.kw typedef.
:errbad.
extern typedef int (*fn)( void );
:eerrbad.

:MSGSYM. ERR_NO_DECLARATOR
:MSGTXT. nameless declaration is not allowed
:MSGJTXT. 柤慜側偟愰尵偼偱偒傑偣傫
A type was used in a declaration but no name was given.
:errbad.
static int;
:eerrbad.

:MSGSYM. ERR_ILLEGAL_TYPE_COMBO
:MSGTXT. illegal combination of type specifiers
:MSGJTXT. 宆巜掕巕偺堘朄側慻崌偣偱偡
An incorrect scalar type was found.  Either a scalar keyword
was repeated or the combination is illegal.
:errbad.
short short x;
short long y;
:eerrbad.

:MSGSYM. ERR_ILLEGAL_QUALIFIER_COMBO
:MSGTXT. illegal combination of type qualifiers
:MSGJTXT. 宆廋忺岅偺堘朄側慻崌偣偱偡
A repetition of a type qualifier has been detected.  Some compilers may
ignore repetitions but strictly speaking it is incorrect code.
:errbad.
const const x;
struct S {
    int virtual virtual fn();
};
:eerrbad.

:MSGSYM. ERR_SYNTAX
:MSGTXT. syntax error
:MSGJTXT. 峔暥僄儔乕
The C++ compiler was unable to interpret the text starting at the location
of the message.  The C++ language is sufficiently complicated that
it is difficult for a compiler to correct the error itself.

:MSGSYM. ERR_PARSER_DIED
:MSGTXT. parser stack corrupted
:MSGJTXT. 峔暥夝愅僾儘僌儔儉偺僗僞僢僋偑夡傟偰偄傑偡
The C++ parser has detected an internal problem that usually indicates
a compiler problem.  Please report this directly to the Open Watcom
development team. See http://www.openwatcom.org/.

:MSGSYM. ERR_NO_NESTED_TEMPLATES
:MSGTXT. template declarations cannot be nested within each other
:MSGJTXT. 僥儞僾儗乕僩愰尵偼丆偍屳偄偺斖埻撪偱僱僗僩偡傞偙偲偑偱偒傑偣傫
Currently, templates can only be declared in namespace scope.
Furthermore, a template declaration must be finished before another
template can be declared.

:MSGSYM. ERR_COMPLICATED_EXPRESSION
:MSGTXT. expression is too complicated
:MSGJTXT. 幃偑暋嶨偡偓傑偡
The expression contains too many levels of nested parentheses.
Divide the expression up into two or more sub-expressions.

:MSGSYM. ERR_INVALID_TYPEDEF_REDEFINITION
:MSGTXT. invalid redefinition of the typedef name '%S'
:MSGJTXT. typedef柤'%S'偺嵞掕媊偼偱偒傑偣傫
Redefinition of typedef names is only allowed if you are redefining a
typedef name to itself.
Any other redefinition is illegal.
You should delete the duplicate
.kw typedef
definition.
:errbad.
typedef int TD;
typedef float TD;   // illegal
:eerrbad.

:MSGSYM. ERR_CLASS_REDEFINED
:MSGTXT. class '%T' has already been defined
:MSGJTXT. 僋儔僗'%T'偼婛偵掕媊偝傟偰偄傑偡
This message usually results from the definition of two classes in the
same scope.  This is illegal regardless of whether the class definitions
are identical.
:errbad.
class C {
};
class C {
};
:eerrbad.

:MSGSYM. ERR_CANT_TAKE_SIZEOF_UNDEFINED
:MSGTXT. 'sizeof' is not allowed for an undefined type
:MSGJTXT. 'sizeof'偼枹掕媊偺宆偵偼巊梡偱偒傑偣傫
If a type has not been defined, the compiler cannot know how large it is.
:errbad.
class C;
int x = sizeof( C );
:eerrbad.

:MSGSYM. ANSI_INIT_BYPASSED
:MSGTXT. initializer for variable '%S' cannot be bypassed
:MSGJTXT. 曄悢'%S'偺弶婜壔巕偼僶僀僷僗偱偒傑偣傫
:ANSI. 1
The variable may not be initialized when code is executing
at the position indicated in the message.  The C++ language
places these restrictions to prevent the use of uninitialized
variables.
:errbad.
int foo( int a )
{
    switch( a ) {
      case 1:
    int b = 2;
    return b;
      default: // b bypassed
    return b + 5;
    }
}
:eerrbad.

:MSGSYM. ERR_DIVISION_BY_ZERO
:MSGTXT. division by zero in a constant expression
:MSGJTXT. 掕悢幃偺拞偱僛儘偵傛傞彍嶼偑婲偙傝傑偡
Division by zero is not allowed in a constant expression.
The value of the expression cannot be used with this error.
:errbad.
int foo( int a )
{
    switch( a ) {
      case 4 / 0:  // illegal
    return a;
    }
    return a + 2;
}
:eerrbad.

:MSGSYM. ANSI_ARITHMETIC_OVERFLOW
:MSGTXT. arithmetic overflow in a constant expression
:MSGJTXT. 掕悢幃偺拞偱嶼弍僆乕僶乕僼儘乕偑婲偙傝傑偡
:ANSI. 3
The multiplication of two integral values cannot be represented.
The value of the expression cannot be used with this error.
:errbad.
int foo( int a )
{
    switch( a ) {
      case 0x7FFF * 0x7FFF * 0x7FFF:  // overflow
    return a;
    }
    return a + 2;
}
:eerrbad.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?