Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Structure of compiler messages

&pagelevel(4)&pagelevel

The compiler issues the following types of messages:

  • Information messages that notify the user about the general compilation process (e.g. the start and termination messages from the compiler and messages such as ’MODULES GENERATED’).

  • Error messages (of the frontend compiler) that directly refer to the compiled source program (e.g. syntax and semantic errors).

    These consist of

    1. the actual error message line

    2. the invalid source program line (optional)

    3. a flag ^ to indicate the error location (optional)

  • Error messages not related to the source program (e.g. disk full, error on opening files, etc.).

Information and error messages are output to one or more of the following destinations during compilation:

  • at the terminal and/or

  • optionally to files or libraries.

The output destination for these messages can be controlled with the MODIFY-DIAGNOSTIC-PROPERTIES statement ("MODIFY-DIAGNOSTIC-PROPERTIES (C/C++-Compiler, #44)").
Error messages that refer to the source program are also documented in the source/error listing (controlled by the MODIFY-LISTING-PROPERTIES statement; see "MODIFY-LISTING-PROPERTIES (C/C++-Compiler, #46)").

General format of the compiler messages:


Error message line:

message-number [message-weight]: filename / line-number: message-text

Optional for error messages referring to the source program:

Invalid source program line

^ marker to indicate the error location


The file name and line number are omitted in error messages (with a message weight of FATAL or ERROR) which do not refer to the source program. In information messages, the message weight is also omitted.

message-number

The 7-digit message number consists of a 3-digit message class, which identifies the compiler component, and a 4-digit message number.


Message class

Components

CFE

Frontend of the compiler:
scanner, preprocessor, parser, listing generator, message facility

CDR

Compiler driver, II-UPDATE

UMP

Intermediate language module ULS, optimizer, inliner

BEM

Backend

SIS

Compiler I/O interface (PROSOS),
Object format (module) generator (OFG),
Diagnostic information generator for AID (DIG)

BND

BINDER (when linking with the BIND statement of the compiler)

CCM

C runtime system


[message weight]

Indicates the message weight, i.e. the severity of the error that has occurred:


[NOTE]

Inconsequential errors, e.g. "ugly" or superfluous constructs which usually have no impact on subsequent program behavior.
Notes are not issued automatically unless the options -R minweight,notes or MINIMAL-MSG-WEIGHT=*NOTE are specified.

[WARNING]

Errors for which the compiler will generate a module, but which could lead to situations resulting in deviant program behavior.

[ERROR],
[*ERROR]

Errors for which no module is generated. The compiler will attempt to continue the compilation until the number of errors specified with the -R limit,n or MAX-ERROR-NUMBER=n option is reached. Errors of the frontend compiler that can either be reduced to the severity of a WARNING/NOTE with the -R warning/note or CHANGE-MSG-WEIGHT =*WARNING()/*NOTE() option and warnings that were upgraded to the severity of an ERROR with the -R error or CHANGE-MSG-WEIGHT=*ERROR() option are flagged with an asterisk.

[FATAL]

Fatal errors leading to abortion of the compilation

[INTERNAL]

Compiler errors, also leading to abortion of the compilation


filename

Name of the file or library element with the invalid source program code

line-number

Indicates the source program line in which the error occurred.

message-text

Text of the error message; can be output in English or German.

Invalid source program line with a marker to indicate the error location

-R show_column or SHOW-COLUMN=*YES is the default setting, which means that the original source program line is shown with the error location marked
(with ^) in addition to the diagnostic message itself. If -R no_show_column or SHOW-COLUMN=*NO is specified, the marked source program line is not output.

Example

//MODIFY-SOURCE-PROP LANG=*C(MODE=1990,STRICT=*YES)
//MODIFY-DIAGNOSTIC-PROP CHANGE-MSG-WEIGHT=*ERROR(CFE1064)
//COMPILE SOURCE=TEST.C
% CFE1064 [*ERROR]: TEST.C / 1: declaration does not declare anything
  struct { int a; };
  ^
% CFE1020 [ERROR]: TEST.C / 3: identifer "abc" is undefined
  abc def;
  ^
% CFE2095 [*ERROR]: USER.H / 3: too few arguments in invocation of macro "M"
  int i = M(3); 
             ^ 

The error number CFE1064 was originally a warning, but was upgraded to the ERROR class with the option CHANGE-MSG-WEIGHT=*ERROR(CFE1064).
The class of errors that are not originally output with an asterisk (e.g. CFE1020 in this case) cannot be changed.
Error number CFE2095 is an example of an error that is generated in strict C89 mode, but can be downgraded to the message weight of a warning with CHANGE-MSG-WEIGHT=*WARNING(CFE2095). The same error number is assigned the error class WARNING in extended C89 mode.

The HELP-MSG command can be used to obtain a more detailed explanation of all the error messages:

HELP-MSG MSG-ID=msgid[,LANGUAGE=D / E]

The compiler messages can be output in English or German. The default setting depends on system generation. The following command can be used to change the task-specific default:

MODIFY-MSG-ATTRIBUTES TASK-LANGUAGE = D / E