top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

Can someOne explain List of #pragma warn directive warning code with explanation?

+2 votes
35 views
Can someOne explain List of #pragma warn directive warning code with explanation?
posted Jun 17, 2015 by Mohammed Hussain

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

1 Answer

0 votes

In c there are many warning messages which can be on or off with help of #pragma warn.
Syntax:

pragma warn +xxx

pragma warn –xxx

pragma warn .xxx

Where
+ means on
- means off
. means on/off (toggle)

xxx is indicate particular warning code in three alphabet. Example: rvl is warning code which means function should return a value.

    #include<stdio.h>
    #pragma warn –rvl
    int main()
    {
        printf("It will not show any warning message");
        return 0;
    }

    Output: It will not show any warning message

When you will execute the above program then compiler will not show the warning message function should return a value because rvl warning is off.
Please check List of warning code

answer Jun 18, 2015 by Chirag Gangdev
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...