[ create a new paste ] login | about

Link: http://codepad.org/fvoocpcv    [ raw code | output | fork ]

C++, pasted on Jun 18:
1
2
3
4
5
6
7
8
9
10
int fn () __attribute__ ((warn_unused_result));

int fn () {return 1;}

int main ()
{
        if (fn () < 0) return -1;
        fn ();
        return 0;
}


Output:
1
2
3
cc1plus: warnings being treated as errors
In function 'int main()':
Line 8: warning: ignoring return value of 'int fn()', declared with attribute warn_unused_result


Create a new paste based on this one


Comments: