------- Comment #6 from gdr at integrable-solutions dot net  2006-07-17 20:19 
-------
Subject: Re:  [4.2 regression] Issue with anonymous namespace

"jason at redhat dot com" <[EMAIL PROTECTED]> writes:

| ------- Comment #3 from jason at redhat dot com  2006-07-17 19:53 -------
| Subject: Re:  [4.2 regression] Issue with anonymous namespace
| 
| gdr at integrable-solutions dot net wrote:
| > I have always warned people that the
| > unnamed namespace transformation to "static" should happen in the
| > *back-end*, not in the front-end using language rules, because the
| > language rules are slightly different in those cases.
| 
| I don't remember ever seeing you mention that before, but it does seem 
| like an interesting idea.

Hi Jason,

  This transformation has been discussed several times.  The last time
I made again that statement was with respect to a PR whose number I
can't remember right now.  However, google gave a link to this

   http://gcc.gnu.org/ml/gcc/2004-01/msg02351.html
   http://gcc.gnu.org/ml/gcc/2004-01/msg02358.html

the discussion is quite involved there, but I suspect it shows how
difficult it is get the caution through.

| Your comments in the PRs talk about not 
| changing the C++ linkage (which we obviously shouldn't), but not about 
| where to implement it.

Basically what I'm saying is this:  We should have two notions of
linkage

  (1) one at the language level, as mandated by the language definition;
  (2) and one at the symbol level, that the middle-end, back-end and
      linker understand.

Then we map the linkages in categrory (1) to those of category (2).
So that would enable us to use "internal linkage" (or hidden
visibilitty) at level (2) without affecting linkage at level 1.

At the moment it looks like the tree reprsentation somehow conflates
those two levels into a single one, leading to the current misbehaviour.

-- Gaby


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28407

Reply via email to