Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22155

"stderr;" as a statement throws no warning

$
0
0

Suppose I have a source code like this:

#include <stdio.h>FILE *p;int main(void) {    p;}

... which will compile (using gcc) without any errors or warnings – unless I turn on -Wall, in which case a statement with no effect warning will be output.

However if the code went like this:

#include <stdio.h>int main(void) {    stderr;}

... no warnings would be shown regardless of -Wall.

Am I missing something here?

gcc version 9.3.0


Viewing all articles
Browse latest Browse all 22155

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>