public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/21928] New: double declaration not recognized
@ 2005-06-06 10:24 wolfgang dot roehrl at de dot gi-de dot com
2005-06-06 10:43 ` [Bug c++/21928] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: wolfgang dot roehrl at de dot gi-de dot com @ 2005-06-06 10:24 UTC (permalink / raw)
To: gcc-bugs
Dear all,
I would like to post a bug report for the GNU C/C++ compiler 3.3-e500.
We use the compiler to generate code for a PowerPC processor.
Used invokation line for the GNU C++ compiler:
ccppc -c -x c++ -ansi -Wall -Werror -mcpu=8540 -fverbose-asm -mbig
-fmerge-templates -mmultiple -mno-string -mstrict-align -O3
-fno-exceptions -fno-rtti -fno-builtin-printf
-I<different include paths>
-D<differen #define's>
X.CPP -oX.O
// file X.CPP
namespace N1
{
extern int i;
}
namespace N2
{
extern int i;
}
using N1::i;
using N2::i;
int f () { return i; }
The code above compiles fine with GNU. But I think that the compiler should
flag the second using declaration ("using N2::i;") since variable i is already
declared in the current scope (cf. 7.3.3/10).
(By the way this is the diagnostic given by Comeau online.)
Kind regards
W. Roehrl
--
Summary: double declaration not recognized
Product: gcc
Version: 3.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: wolfgang dot roehrl at de dot gi-de dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: sparc-sun-solaris2.5.1
GCC host triplet: i386-pc-mingw32
GCC target triplet: powerpc-wrs-vxworks
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21928
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/21928] double declaration not recognized
2005-06-06 10:24 [Bug c++/21928] New: double declaration not recognized wolfgang dot roehrl at de dot gi-de dot com
@ 2005-06-06 10:43 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-06 10:43 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-06 10:42 -------
*** This bug has been marked as a duplicate of 20240 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21928
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-06-06 10:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-06 10:24 [Bug c++/21928] New: double declaration not recognized wolfgang dot roehrl at de dot gi-de dot com
2005-06-06 10:43 ` [Bug c++/21928] " pinskia at gcc dot gnu dot 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).