http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57201

minux <minux.ma at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |minux.ma at gmail dot com

--- Comment #6 from minux <minux.ma at gmail dot com> 2013-05-08 13:21:15 UTC 
---
A small standalone test case:

$ cat stdio.c
#include <test.h>

void f(void) {
        stdout;
}
$ cat test.h 
int *stdout;
#define stdout stdout
$ gcc -Wall -Werror -c stdio.c  -I .
In file included from stdio.c:1:0:
stdio.c: In function ‘f’:
./test.h:2:16: error: statement with no effect [-Werror=unused-value]
 #define stdout stdout
                ^
stdio.c:4:2: note: in expansion of macro ‘stdout’
  stdout;
  ^
cc1: all warnings being treated as errors
$ gcc -Wall -Werror -c stdio.c  -isystem .
$ gcc -Wall -Werror -c stdio.c  -isystem . -ftrack-macro-expansions=0
In file included from stdio.c:1:0:
stdio.c: In function ‘f’:
./test.h:2:16: error: statement with no effect [-Werror=unused-value]
 #define stdout stdout
                ^
stdio.c:4:2: note: in expansion of macro ‘stdout’
  stdout;
  ^
cc1: all warnings being treated as errors
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.8.0/configure --enable-languages=c,c++,go,lto
Thread model: posix
gcc version 4.8.0 (GCC)

Reply via email to