The C front-end says that struct {int i;} is compatiable with struct {int i,j} 
which is wrong.
The following testcase should be rejected but it is not:
---- file1.c ----
struct op {
  int i;
};
void a (struct op* o);
---- end -----
---- file2.c -----
struct listop {
  int i, j;
};
void a(struct listop *o) {}
---- end ----

This is not a regression, 3.4.0 accepts it also.  This causes us to remove some 
casts while compiling 
perlbmk and causes a type mismatch.  This is a very reduced testcase from the 
orginal one.

I am going to mark this as blocking PR 22368 as this causes to ICE with that 
patch.

-- 
           Summary: struct {int i;} is not compatiable with struct {int i,j}
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
OtherBugsDependingO 22368
             nThis:


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

Reply via email to