public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/47102] New: error message "duplicate member" in error ?
@ 2010-12-29 9:10 dcb314 at hotmail dot com
2010-12-29 11:43 ` [Bug c/47102] " jsm28 at gcc dot gnu.org
2010-12-29 11:44 ` jsm28 at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: dcb314 at hotmail dot com @ 2010-12-29 9:10 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c/47102] error message "duplicate member" in error ?
2010-12-29 9:10 [Bug c/47102] New: error message "duplicate member" in error ? dcb314 at hotmail dot com
@ 2010-12-29 11:43 ` jsm28 at gcc dot gnu.org
2010-12-29 11:44 ` jsm28 at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2010-12-29 11:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47102
--- Comment #1 from Joseph S. Myers <jsm28 at gcc dot gnu.org> 2010-12-29 11:43:20 UTC ---
The diagnostic is correct; the code is invalid; C1X requires this to be
diagnosed; it is ambiguous whether "page" refers to an element directly in the
struct or one accessed via the anonymous union therein. See bug 4784.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c/47102] error message "duplicate member" in error ?
2010-12-29 9:10 [Bug c/47102] New: error message "duplicate member" in error ? dcb314 at hotmail dot com
2010-12-29 11:43 ` [Bug c/47102] " jsm28 at gcc dot gnu.org
@ 2010-12-29 11:44 ` jsm28 at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2010-12-29 11:44 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47102
Joseph S. Myers <jsm28 at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
--- Comment #2 from Joseph S. Myers <jsm28 at gcc dot gnu.org> 2010-12-29 11:44:07 UTC ---
Not a bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-12-29 11:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-29 9:10 [Bug c/47102] New: error message "duplicate member" in error ? dcb314 at hotmail dot com
2010-12-29 11:43 ` [Bug c/47102] " jsm28 at gcc dot gnu.org
2010-12-29 11:44 ` jsm28 at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).