The LISTING pragma can be used to suppress the output of source text lines.
#pragma
LIST[ING]
{ OFF | ON }
If LIST OFF
is specified, all source text lines that follow this directive are suppressed in the listing.
LIST ON
cancels the effect of LIST OFF
, i.e. all subsequent source text lines are shown in the listing.
Source text lines in a header file are not shown in the listing if the corresponding #include
directives are enclosed within #pragma LIST OFF
and #pragma LIST ON
directives.
Error messages of the compiler that are related to source text lines for which output has been suppressed are inserted at the point at which the source text in question would normally appear. In such cases, the appropriate line number and the file or element name are also shown.
Example
Source text:
98 ... 99 ... <-- Message related to line 99 100 ... 101 #pragma LIST OFF 102 #include "msg.h" 1 ... ... <-- Messages related to suppressed lines 45 ... 103 #pragma LIST ON 104 ...
Source/Error listing::
98 ... 99 ... ****> CFE2234 [ERROR] : ... 100 ... 101 #pragma LIST OFF ****> CFE1004 [NOTE] : msg.h / 13: ... ****> CFE1386 [WARNING] : msg.h / 37: ... 103 #pragma LIST ON 104 ...