There is a bug in gcc V 3.3.5 which is distributed with
Novell (SuSE) Linux 9.3.
The older gcc V 2.95.3 (coming with SuSE 7.3) doesn't
have the following behaviour and is working correct.

Please generate the following 2 Files:

inc_ext.h:
extern int iVal;
<eof>

and t.c:
#include <stdio.h>
  void t(void)
  {
#include "inc_ext.h"

  static int iVal=0;

  printf("Hello World\n");
  return;
  }
<eof>

Using the older gcc V 2.95.3, you will get a correct error-message:
>
> cc -c t.c -o t.o
t.c: In function `t':
t.c:5: redeclaration of `iVal'
inc_ext.h:1: `iVal' previously declared here
>
>
Using gcc V 3.3.5, no error message will be displayed: 
>
> cc -c t.c -o t.o
>
>From our point of view, this behavior is very dangerous during
programming and testing C-Code. If the compiler is additionally
switched into the pedantic mode, you will see only a simple warning.


-- 
           Summary: Missing Errormessage
           Product: gcc
           Version: 3.3.5
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: Klaus-Dieter dot Weber at eads dot com
  GCC host triplet: i386-Linux


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

Reply via email to