Preprocessor directive for Turning ON/OFF Warning settings.

We can use #pragma warn directive to check ‘Display Warning’ settings in the Option | Compiler | Messages dialog boxes. For example, if your source code contain the directives

#pragma warn +xxx

#pragma warn -yyy

#pragma warn .zzz

the xxx warning will be turned on, the yyy warning will be turned off, and the zzz warning will be restored to value it had when compilation of the file began. For example:

#pragma warn -rvl

will disable the warning ‘Function should return a value’. For the complete list of three letter abbreviation you can refer to online help.

This entry was posted in C Programming and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>