Microchip Technology XC8 Standard Compiler (Workstation) SW006021-1 SW006021-1 ユーザーズマニュアル

製品コード
SW006021-1
ページ / 518
Error and Warning Messages
 2012 Microchip Technology Inc.
DS52053B-page 385
(171) wrong number of preprocessor macro arguments for "*" (* instead of *) 
(Preprocessor)
A macro has been invoked with the wrong number of arguments, for example:
#define ADD(a, b) (a+b)
ADD(1, 2, 3)        /* oops -- only two arguments required */
(172) formal parameter expected after # 
(Preprocessor)
The stringization operator # (not to be confused with the leading # used for preproces-
sor control lines) must be followed by a formal macro parameter, for example:
#define str(x) #y  /* oops -- did you mean x instead of y? */
If you need to stringize a token, you will need to define a special macro to do it, for 
example:
#define __mkstr__(x) #x
then use __mkstr__(token) wherever you need to convert a token into a string.
(173) undefined symbol "*" in #if, 0 used 
(Preprocessor)
A symbol on a #if expression was not a defined preprocessor macro. For the pur-
poses of this expression, its value has been taken as zero. This warning may be dis-
abled with some compilers. Example:
#if FOO+BAR    /* e.g. FOO was never #defined */
  #define GOOD
#endif
(174) multi-byte constant "*" isn’t portable 
(Preprocessor)
Multi-byte constants are not portable, and in fact will be rejected by later passes of the 
compiler, for example:
#if CHAR == ’ab’
  #define MULTI
#endif
(175) division by zero in #if; zero result assumed 
(Preprocessor)
Inside a #if expression, there is a division by zero which has been treated as yielding 
zero, for example:
#if foo/0  /* divide by 0: was this what you were intending? */
  int a;
#endif
(176) missing newline 
(Preprocessor)
A new line is missing at the end of the line. Each line, including the last line, must have 
a new line at the end. This problem is normally introduced by editors.
(177) symbol "*" in -U option was never defined 
(Preprocessor)
A macro name specified in a -U option to the preprocessor was not initially defined, and 
thus cannot be undefined.
(179) nested comments 
(Preprocessor)
This warning is issued when nested comments are found. A nested comment may indi-
cate that a previous closing comment marker is missing or malformed, for example:
output = 0;  /* a comment that was left unterminated
flag = TRUE; /* next comment:
                hey, where did this line go? */