This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/31300] undetected class name clash
- From: "thierry dot galas at med dot ge dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Mar 2007 18:16:00 -0000
- Subject: [Bug c++/31300] undetected class name clash
- References: <bug-31300-14285@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from thierry dot galas at med dot ge dot com 2007-03-21 18:16 -------
Subject: Re: undetected class name clash
I agree , sure it is invalid ,(no mine at the root) but a diagnostic
would be nice
very difficult to decide people to use c++ , if this kind of issue is
not detected whereas symbol (variable function) name clash are
detected at link time in "C"
pinskia at gcc dot gnu dot org wrote:
> ------- Comment #3 from pinskia at gcc dot gnu dot org 2007-03-21 17:53 -------
> They are not local, if you want to declare local classes to a file use an
> anonymous namespace.
>
> This code is invalid but no diagnostic is required by the C++ standard (it
> violates the One definition rule).
>
>
>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31300