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

製品コード
SW006021-1
ページ / 518
XC8 Command-line Driver
 2012 Microchip Technology Inc.
DS52053B-page 89
For example, a project is compiled, but, as shown, produces a warning from the parser 
and an error from the linker (numbered 362 and 492, respectively).
main.c: main() 
    17: ip = &b; 
              ^ (362) redundant "&" applied to array (warning)  
(492) attempt to position absolute psect "text" is illegal
Notice that the parser message format identifies the particular line and position of the 
offending source code.
If the -E option is now used and the compiler issues the same messages, the compiler 
will output:
main.c: 12: (362) redundant "&" applied to array (warning)  
(492) attempt to position absolute psect "text" is illegal (error)
The user now uses the --WARNFORMAT in the following fashion:
--WARNFORMAT="%a %n %l %f %s"
When recompiled, the following output will be displayed:
parser 362 12 main.c redundant "&" applied to array 
(492) attempt to position absolute psect "text" is illegal (error)
Notice that the format of the warning was changed, but that of the error message was 
not. The warning format now follows the specification of the environment variable. The 
application name (parser) was substituted for the %a placeholder, the message 
number (362) substituted the %n placeholder, etc.