--- Comment #9 from bangerth at dealii dot org 2007-03-26 15:17 ---
(In reply to comment #8)
> but I guess it could be possible at link time, as it is already the case
> for C symbols.
We also don't do that in C: if you have two functions of the same name defined
in two different .c fi
--- Comment #8 from thierry dot galas at med dot ge dot com 2007-03-26
13:56 ---
Subject: Re: undetected class name clash
Thanks for the explanation,
I agree that it is hard to detect for a compiler to detect ODL violation,
especially if we want to exclude from ODL local classes ou
--- Comment #7 from bangerth at dealii dot org 2007-03-23 02:13 ---
(In reply to comment #4)
> I agree , sure it is invalid ,(no mine at the root) but a diagnostic
> would be nice
It is very hard for a compiler to detect this because it only sees that there
is a class 'T'. The compile
--- Comment #6 from thierry dot galas at med dot ge dot com 2007-03-21
18:33 ---
Subject: Re: undetected class name clash
Thanks for the anonymous namespace suggestion (I didn't know about it
before) ,
it is efficient and could be systematized at the scale of a large team.
pinski
--- Comment #5 from pinskia at gcc dot gnu dot org 2007-03-21 18:26 ---
The only way to get a diagnostic is to output the class definition and even
then sometimes the detection could be wrong. ODR reporting is a hard problem
with most code.
--
http://gcc.gnu.org/bugzilla/show_bug.c
--- 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 de
--- 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).
--
pin
--- Comment #2 from thierry dot galas at med dot ge dot com 2007-03-21
17:52 ---
samething with gcc :
version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31300
--- Comment #1 from thierry dot galas at med dot ge dot com 2007-03-21
17:50 ---
Created an attachment (id=13245)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13245&action=view)
very short code showing the issue in a tar file
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31