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/47102] New: error message "duplicate member" in error ?


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

           Summary: error message "duplicate member" in error ?
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dcb314@hotmail.com


I just tried to compile the following C code with the latest 4.6 snapshot
20101225 on a Linux x86_64 box. It is derived from code in the Linux
kernel.

typedef int dma_addr_t;
typedef unsigned short u16;
typedef unsigned long u64;

struct igbvf_buffer {
    dma_addr_t dma;
    struct sk_buff *skb;
    union {
        /* Tx */
        struct {
            unsigned long time_stamp;
            u16 length;
            u16 next_to_watch;
            u16 mapped_as_page;
        };
        /* Rx */
        struct {
            struct page *page;
            u64 page_dma;
            unsigned int page_offset;
        };
    };
    struct page *page;
};

The compiler said

bug15.c:25:18: error: duplicate member 'page'

I've tried the same source code on Comeau C and it finds no error.


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