From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jorn Baayen To: gcc-gnats@gcc.gnu.org Subject: c/4080: GCC 3.0.1 doesn't give proper warnings on C++ style declarations Date: Wed, 22 Aug 2001 06:16:00 -0000 Message-id: <200108221304.f7MD4gC09926@orthanc.hub1> X-SW-Source: 2001-08/msg00568.html List-Id: >Number: 4080 >Category: c >Synopsis: GCC 3.0.1 doesn't give proper warnings on C++ style declarations >Confidential: no >Severity: non-critical >Priority: medium >Responsible: unassigned >State: open >Class: accepts-illegal >Submitter-Id: net >Arrival-Date: Wed Aug 22 06:16:02 PDT 2001 >Closed-Date: >Last-Modified: >Originator: >Release: 3.0.1 >Organization: >Environment: System: Linux orthanc 2.4.8-ac1 #3 Sun Aug 12 00:11:33 CDT 2001 i586 unknown Architecture: i586 cpu: AMD K6-2 400 libc: GNU Libc 2.2.3 host: i586-pc-linux-gnu build: i586-pc-linux-gnu target: i586-pc-linux-gnu configured with: ../gcc-3.0.1/configure --prefix=/usr --with-gxx-include-dir=/usr/include/g++ --enable-shared --enable-languages=c,c++,f77 >Description: When compiling a program like this, GCC doesn't warn about the C++ style declarations in the C code without -Wall, and it does warn, but incorrectly, when -Wall is turned on. >How-To-Repeat: Example code: int main (int argc, char **argv) { int bla; bla = 1; int bla2 = 2; return 1; } Output with -Wall: bla.c: In function `main': bla.c:6 warning: unused variable `bla2' >Fix: None >Release-Note: >Audit-Trail: >Unformatted: in C code.