This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/27898] New: Compile failure with --combine and anonymous structures


$ cat foobar.c
union u {
        struct {
                int i;
        };
};

extern int somefunc(union u *);
$ gcc --combine -c foobar.c foobar.c
foobar.c:8: error: conflicting types for 'somefunc'
foobar.c:8: error: previous declaration of 'somefunc' was here

gcc version 4.1.0 20060304 (Red Hat 4.1.0-3)

Happens on both PowerPC and i386. If the internal structure is made
non-anonymous, it compiles.


-- 
           Summary: Compile failure with --combine and anonymous structures
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dwmw2 at infradead dot org


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]