This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/2166
- To: nobody at gcc dot gnu dot org
- Subject: Re: c++/2166
- From: Gabriel Dos Reis <Gabriel dot Dos-Reis at cmla dot ens-cachan dot fr>
- Date: 18 Apr 2001 07:46:01 -0000
- Cc: gcc-prs at gcc dot gnu dot org,
- Reply-To: Gabriel Dos Reis <Gabriel dot Dos-Reis at cmla dot ens-cachan dot fr>
The following reply was made to PR c++/2166; it has been noted by GNATS.
From: Gabriel Dos Reis <Gabriel.Dos-Reis@cmla.ens-cachan.fr>
To: Mark Mitchell <mark@codesourcery.com>
Cc: Gabriel.Dos-Reis@cmla.ens-cachan.fr, nobody@gcc.gnu.org,
gcc-gnats@gcc.gnu.org, carlo@alinoe.com
Subject: Re: c++/2166
Date: 18 Apr 2001 09:40:39 +0200
Mark Mitchell <mark@codesourcery.com> writes:
| >>>>> "Gabriel" == Gabriel Dos Reis <Gabriel.Dos-Reis@cmla.ens-cachan.fr> writes:
|
| Gabriel> The Standard requires that a member of an anonymous
| Gabriel> namespace be given a linker-visible unique name in a
| Gabriel> given translation unit so that two different translation
| Gabriel> units don't mess up.
|
| So, do you agree with me that things are OK, or with Carlo that there
| is a problem?
Well, what I meant is that g++ has to ensure that the construct
namespace {
int test;
};
can appear in different translation units (within the same program)
and each translation unit have its own idea of `test' -- the different
`test's should not cause any conflict at the linker level.
Carlo think that means the compiler should use the file-definition name
as part of the mangled name of `test'.
That is a way to achieve uniqueness. Another can be the time of
tranlation. Actually anything which can lead to uniqueness is good.
I ran several tests and I think the current scheme is not robust
enought -- it seems to use very few characters ( < 7) to fake
uniqueness.
I didn't run into *actual* problems (I ran only 5 tests) so I cannot
definitely say that there IS a problem. However, I think there is a
potential problem.
This issue deserve further investigation -- I would do that as soon as
I have a chance.
-- Gaby