⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cerrs.gml

📁 Open Watcom 的 C 编译器源代码
💻 GML
📖 第 1 页 / 共 5 页
字号:
:cmt *****************************************************************************
:cmt *
:cmt *                            Open Watcom Project
:cmt *
:cmt *    Portions Copyright (c) 1983-2002 Sybase, Inc. All Rights Reserved.
:cmt *
:cmt *  ========================================================================
:cmt *
:cmt *    This file contains Original Code and/or Modifications of Original
:cmt *    Code as defined in and that are subject to the Sybase Open Watcom
:cmt *    Public License version 1.0 (the 'License'). You may not use this file
:cmt *    except in compliance with the License. BY USING THIS FILE YOU AGREE TO
:cmt *    ALL TERMS AND CONDITIONS OF THE LICENSE. A copy of the License is
:cmt *    provided with the Original Code and Modifications, and is also
:cmt *    available at www.sybase.com/developer/opensource.
:cmt *
:cmt *    The Original Code and all software distributed under the License are
:cmt *    distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
:cmt *    EXPRESS OR IMPLIED, AND SYBASE AND ALL CONTRIBUTORS HEREBY DISCLAIM
:cmt *    ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF
:cmt *    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR
:cmt *    NON-INFRINGEMENT. Please see the License for the specific language
:cmt *    governing rights and limitations under the License.
:cmt *
:cmt *  ========================================================================
:cmt *
:cmt * Description:  C compiler diagnostic messages.
:cmt *
:cmt *****************************************************************************
:cmt

:cmt    Word usage:
:cmt
:cmt    'parameter' is used for macro parms
:cmt    'argument' is used for function arguments

:cmt    GML Macros used (see MSGMACS.GML):

:cmt        :ansi <n>   warning if extensions enabled, error otherwise
:cmt        :ansierr    ignored if extensions enabled, error otherwise
:cmt        :ansiwarn <n>   ignored if extensions enabled, warn otherwise
:cmt        :warning <n>    message is a warning with a specific level
:cmt        :info       informational message
:cmt
:cmt        :msgsym <sym>   internal symbolic name for message
:cmt        :msgtxt <text>  text for message
:cmt
:cmt        :msglvl     start of header title for a group of messages
:cmt        :emsglvl    end of header title for a group of messages
:cmt        :errbad     start of an example that generates an error msg
:cmt        :eerrbad    end of an example that generates an error msg
:cmt        :errgood    start of an example that compiles clean
:cmt        :eerrgood   end of an example that compiles clean
:cmt
:cmt        .kw     highlight a keyword
:cmt        .id     highlight an identifier
:cmt        .ev     highlight an environment variable
:cmt        .us     italicize a phrase
:cmt        .np     start a new paragraph

:cmt    The following substitutions are made:
:cmt        &incvarup   environment variable for include path
:cmt        &wclname    Compile and Link utility name

:cmt    Note for translators:

:cmt    Japanese error messages are supported via the :MSGJTXT tag.
:cmt    If there is no :MSGJTXT. for a particular :MSGSYM. then the
:cmt    message will come out in English.  Translation may proceed
:cmt    by translating error messages that do not have the :MSGJTXT.
:cmt    tag present and adding the :MSGJTXT. tag with the Japanese
:cmt    text after the :MSGTXT. tag.  If the :MSGJTXT. has no text
:cmt    then the error message must also be translated.  This has
:cmt    been found to be easier when searching for messages that
:cmt    still need to be translated.

:cmt -------------------------------------------------------------------
:MSGGRP. Warn1
:MSGGRPSTR. W
:MSGGRPNUM. 100
:MSGGRPTXT. Warning Level 1 Messages
:cmt -------------------------------------------------------------------
:MSGSYM. ERR_PARM_INCONSISTENT_INDIRECTION_LEVEL
:MSGTXT. Parameter %d contains inconsistent levels of indirection
:MSGJTXT. 僷儔儊乕僞%d偼柕弬偟偨儗儀儖偺娫愙嶲徠傪娷傫偱偄傑偡
:WARNING. 1
.np
The function is expecting something like
.id char **
and it is being passed a
.id char *
for instance.
:MSGSYM. ERR_NONPORTABLE_PTR_CONV
:MSGTXT. Non-portable pointer conversion
:MSGJTXT. 堏怉惈偺側偄億僀儞僞曄姺偱偡
:WARNING. 1
.np
This message is issued whenever you convert a non-zero constant to a pointer.
:MSGSYM. ERR_PCTYPE_MISMATCH
:MSGTXT. Type mismatch (warning)
:MSGJTXT. 宆偑堦抳偟傑偣傫
:WARNING. 1
.np
This message is issued for a function return value or an assignment where
both types are pointers, but they are pointers to different kinds of objects.
:MSGSYM. ERR_PARM_COUNT_WARNING
:MSGTXT. Parameter count does not agree with previous definition (warning)
:MSGJTXT. 僷儔儊乕僞乕悢偑丆慜偺掕媊偲堦抳偟傑偣傫
:WARNING. 1
.np
You have either not enough parameters or too many parameters in a call
to a function.
If the function is supposed to have a variable number of parameters, then
you can ignore this warning, or you can change the function declaration
and prototypes to use the ",..." to indicate that the function indeed
takes a variable number of parameters.
:MSGSYM. ERR_INCONSISTENT_INDIRECTION_LEVEL
:MSGTXT. Inconsistent levels of indirection
:MSGJTXT. 娫愙嶲徠偺儗儀儖偑柕弬偟偰偄傑偡
:WARNING. 1
.np
This occurs in an assignment or return statement when one of the operands
has more levels of indirection than the other operand.
For example, a
.id char **
is being assigned to a
.id char *.
.np
Solution: Correct the levels of indirection or use a
.id void *.
:MSGSYM. ERR_ASSIGNMENT_IN_BOOL_EXPR
:MSGTXT. Assignment found in boolean expression
:MSGJTXT. 榑棟幃偺拞偵戙擖偑偁傝傑偡
:WARNING. 1
.np
An assignment of a constant has been detected in a boolean expression.
For example: "if( var = 0 )".
It is most likely that you want to use "==" for testing for equality.
:MSGSYM. ERR_CONSTANT_TOO_BIG
:MSGTXT. Constant out of range - truncated
:MSGJTXT. 斖埻奜偺掕悢偱偡 - 愗傝媗傔傜傟傑偟偨
:WARNING. 1
.np
This message is issued if a constant cannot be represented in 32 bits
or if a constant is outside the range of valid values
that can be assigned to a variable.
:MSGSYM. ERR_MISSING_RETURN_VALUE
:MSGTXT. Missing return value for function '%s'
:MSGJTXT. 娭悢'%s'偺偨傔偺栠傝抣偑偁傝傑偣傫
:WARNING. 1
.np
A function has been declared with a function return type, but no
.kw return
statement was found in the function.  Either add a
.kw return
statement or change the function return type to
.kw void.
:MSGSYM. ERR_DUPLICATE_TYPEDEF_ALREADY_DEFINED
:MSGTXT. Duplicate typedef already defined
:MSGJTXT. 偡偱偵掕媊偝傟偨typedef傪嵞掕媊偟偰偄傑偡
:WARNING. 1
.np
A duplicate typedef is not allowed in ANSI C.
This warning is issued when compiling with extensions enabled.
You should delete the duplicate typedef definition.
:MSGSYM. ERR_UNUSED_1
:MSGTXT. not used
:MSGJTXT. 偙偺儊僢僙乕僕偼巊梡偝傟傑偣傫
:WARNING. 1
unused message
:MSGSYM. ERR_FORTRAN_PRAGMA_NOT_DEFINED
:MSGTXT. 'fortran' pragma not defined
:MSGJTXT. 'fortran'偼掕媊偝傟偰偄傑偣傫
:WARNING. 1
.np
You have used the
.kw fortran
keyword in your program, but have not defined a #pragma for
.kw fortran.
:MSGSYM. ERR_MEANINGLESS
:MSGTXT. Meaningless use of an expression
:MSGJTXT. 偙偺幃偺巊梡偼柍堄枴偱偡
:WARNING. 1
.np
The line contains an expression that does nothing useful.
In the example "i = (1,5);", the expression "1," is meaningless.
:MSGSYM. ERR_POINTER_TRUNCATION
:MSGTXT. Pointer truncated
:MSGJTXT. 億僀儞僞偼愗傝媗傔傜傟傑偟偨
:WARNING. 1
.np
A far pointer is being passed to a function that is expecting a near
pointer, or a far pointer is being assigned to a near pointer.
:MSGSYM. ERR_POINTER_TYPE_MISMATCH
:MSGTXT. Pointer type mismatch
:MSGJTXT. 億僀儞僞乕宆偑晄堦抳偱偡
:WARNING. 1
.np
You have two pointers that either point to different objects, or the
pointers are of different size, or they have different modifiers.
:MSGSYM. ERR_MISSING_LAST_SEMICOLON
:MSGTXT. Missing semicolon
:MSGJTXT. 僙儈僐儘儞偑偁傝傑偣傫
:WARNING. 1
.np
You are missing the semicolon ";" on the field definition just before
the right curly brace "}".
:MSGSYM. ERR_ADDR_OF_ARRAY
:MSGTXT. &array may not produce intended result
:MSGJTXT. 攝楍柤傊偺&墘嶼巕偺巊梡丆堄恾偝傟偨寢壥傪惗偠側偄偐傕偟傟傑偣傫
:WARNING. 1
.np
The type of the expression "&array" is different from the type of the
expression "array".
Suppose we have the declaration
.id char buffer[80];
Then the expression
.id (&buffer + 3)
will be evaluated as
.id (buffer + 3 * sizeof(buffer))
which is
.id (buffer + 3 * 80)
and not
.id (buffer + 3 * 1)
which is what most people expect to happen.
The address of operator "&" is not required for getting the address of an
array.
:MSGSYM. ERR_RET_ADDR_OF_AUTO
:MSGTXT. Attempt to return address of auto variable
:MSGJTXT. 帺摦曄悢偺傾僪儗僗傪曉偦偆偲偟傑偡
:WARNING. 1
.np
This warning usually indicates a serious programming error.
When a function exits, the storage allocated on the stack for
auto variables is released.
This storage will be overwritten by further function calls
and/or hardware interrupt service routines.
Therefore, the data pointed to by the return value may be destroyed
before your program has a chance to reference it or make a copy of it.
:MSGSYM. ERR_PASTE_TOKEN_DISCARDED
:MSGTXT. '##' tokens did not generate a single token (rest discarded)
:MSGJTXT. '##'僩乕僋儞偑丆扨堦僩乕僋儞傪惗惉偟傑偣傫偱偟偨乮巆傝偼幪偰傜傟傑偟偨乯
:WARNING. 1
.np
When two tokens are pasted together using ##, they must form a string
that can be parsed as a single token.
:MSGSYM. ERR_UNREFERENCED_LABEL
:MSGTXT. Label '%s' has been defined but not referenced
:MSGJTXT. 儔儀儖'%s'偑掕媊偝傟傑偟偨偑丆嶲徠偝傟傑偣傫偱偟偨
:WARNING. 1
.np
You have defined a label that is not referenced in a
.kw goto
statement.
It is possible that you are missing the
.kw case
keyword when using an enumerated type name as a case in a
.kw switch
statement.
If not, then the label can be deleted.
:MSGSYM. ERR_ADDR_OF_STATIC_FUNC_TAKEN
:MSGTXT. Address of static function '%s' has been taken
:MSGJTXT. 僗僞僥傿僢僋娭悢'%s'偺傾僪儗僗偑偲傜傟傑偟偨
:WARNING. 1
.np
This warning may indicate a potential problem when the program is overlayed.
:MSGSYM. ERR_LVALUE_CAST
:MSGTXT. lvalue cast is not standard C
:MSGJTXT. 嵍曈抣偺僉儍僗僩偼丆昗弨偺C偱偼偁傝傑偣傫
:WARNING. 1
.np
A cast operation does not yield an lvalue in ANSI standard C.
However, to provide compatibility with code written prior to the availability
of ANSI standard C compilers, if an expression was an lvalue prior to the
cast operation, and the cast operation does not cause any conversions, the
compiler treats the result as an lvalue and issues this warning.
:MSGSYM. ERR_JUNK_FOLLOWS_DIRECTIVE
:MSGTXT. Text following pre-processor directives is not standard C
:MSGJTXT. 僾儕僾儘僙僢僒媅帡柦椷偵懕偄偰偄傞僥僉僗僩偑丆昗弨偺C偱偼偁傝傑偣傫
:WARNING. 1
.np
Arbitrary text is not allowed following a pre-processor directive.
Only comments are allowed following a pre-processor directive.
:MSGSYM. ERR_LIT_TOO_LONG
:MSGTXT. Literal string too long for array - truncated
:MSGJTXT. 儕僥儔儖暥帤楍偑攝楍偵懳偟偰挿偡偓傑偡 - 愗傝媗傔傜傟傑偟偨
:WARNING. 1
.np
The supplied literal string contains more characters than the specified
dimension of the array.
Either shorten the literal string, or increase the dimension of the array
to hold all of the characters from the literal string.
:MSGSYM. ERR_SPLICE_IN_CPP_COMMENT
:MSGTXT. '//' style comment continues on next line
:MSGJTXT. '//'宍幃偺僐儊儞僩偑師峴偵懕偄偰偄傑偡
:WARNING. 1
.np
The compiler has detected a line continuation during the processing
of a C++ style comment ("//").  The warning can be removed by switching to
a C style comment ("/**/").  If you require the comment to be terminated
at the end of the line, make sure that the backslash character is not
the last character in the line.
.exam begin
#define XX 23 // comment start \
comment \
end

int x = XX; // comment start ...\
comment end
.exam end
:MSGSYM. ERR_COMPARE_ALWAYS
:MSGTXT. Comparison result always %d
:MSGJTXT. 斾妑偺寢壥偼忢偵%d偱偡
:WARNING. 1
.np
The line contains a comparison that is alway true (1) or false (0).
For example comparing an unsigned expression to see if it is >= 0 or < 0
is redundant.
Check to see if the expression should be signed instead of unsigned.
:MSGSYM. ERR_INCDEPTH
:MSGTXT. Nested include depth of %d exceeded
:MSGJTXT. 僱僗僩偟偨僀儞僋儖乕僪偺怺偝偑%d傪挻偊傑偟偨
:WARNING. 1
.np
The number of nested include files has reached a  preset limit,
check for recursive include statements.
:MSGSYM. NON_ZERO_CONST
:MSGTXT. Constant must be zero for pointer compare
:MSGJTXT. 億僀儞僞偲斾妑偡傞掕悢偼僛儘偱側偗傟偽側傝傑偣傫
:WARNING. 1
.np
A pointer is being compared using == or != to a non-zero constant.
:MSGSYM. ERR_EXPANDED_TRIGRAPH
:MSGTXT. trigraph found in string
:MSGJTXT. 栤戣偲側傞嶰廳暥帤乮僩儔僀僌儔僼乯偑偁傝傑偡
:WARNING. 1
.np
Trigraph expansion occurs inside a  string literal.
This warning can be disabled
via the command line or
.kw #pragma warning
directive.
.exam begin
// string expands to "(?]?~????"!
char *e = "(???)???-????";
// possible work-arounds
char *f = "(" "???" ")" "???" "-" "????";
char *g = "(\?\?\?)\?\?\?-\?\?\?\?";
.exam end
:MSGSYM. ERR_SLACK_ADDED
:MSGTXT. %d padding byte(s) added
:MSGJTXT. %d僶僀僩偺僷僨傿儞僌偑壛偊傜傟傑偟偨
:WARNING. 1
.np
The compiler has added slack bytes to align a member to
the correct offset.
:MSGSYM. ERR_WEIRD_ENDIF_ENCOUNTER
:MSGTXT. #endif matches #if in different source file '%s'

⌨️ 快捷键说明

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