This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/47102] New: error message "duplicate member" in error ?
- From: "dcb314 at hotmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 29 Dec 2010 09:10:37 +0000
- Subject: [Bug c/47102] New: error message "duplicate member" in error ?
- Auto-submitted: auto-generated
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.