Message Options
This topic contains a list and details of different message options.
-h [no]message=n[:n. . .]
Default: Determined by -h msglevel_n
Enables or disables specified compiler messages, where n is the number of a message to be enabled or disabled. More than one message number can be specified; multiple numbers must be separated by a colon with no intervening spaces. For example, to disable messages CC-174 and CC-9, specify: -h nomessage=174:9.
The -h [no]message=n option overrides -h msglevel_n for the specified messages. If n is not a valid message number, it is ignored. Any compiler message except ERROR, INTERNAL, and LIMIT messages can be disabled; attempts to disable these messages by using the -h nomessage option are ignored.
-h msglevel_n
Default: -h msglevel_3
- 0
- Comment
- 1
- Note
- 2
- Caution
- 3
- Warning
- 4
- Error
-h report=args
Generates report messages specified in args and allows the direction of the specified messages to a file. No spaces are allowed around the equal sign (=) or any of the args codes. The -h msgs option also provides optimization messages.
- f
- Writes specified messages to file.V, where file is the source file specified on the command line. If the f option is not specified, messages are written to stderr.
- i
- Generates inlining optimization messages.
- s
- Generates scalar optimization messages.
- v
- Generates vector optimization messages.
cc -h report=is myfile.c
-h [no]abort
Default: -h noabort
Controls whether a compilation aborts if an error is detected.
-h errorlimit[=max_err_msgs]
Default: -h errorlimit=100
Specify the maximum number of error messages the compiler prints before it exits, where max_error_msgs is a positive integer. Specifying -h errorlimit=0 disables exiting on the basis of the number of errors. Specifying -h errorlimit with no qualifier is the same as setting max_error_msgs to 1.
-h error_on_warning
Default: off
The -h error_on_warning option changes the message level of all warning messages to error. This option is off by default.