[Bug c++/29365] Unnecessary anonymous namespace warnings

2007-10-22 Thread jason at gcc dot gnu dot org
--- Comment #41 from jason at gcc dot gnu dot org 2007-10-22 18:12 --- Subject: Bug 29365 Author: jason Date: Mon Oct 22 18:12:36 2007 New Revision: 129554 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129554 Log: PR c++/32470 * name-lookup.c (push_namespace_wit

[Bug c++/29365] Unnecessary anonymous namespace warnings

2007-08-29 Thread gdr at cs dot tamu dot edu
--- Comment #40 from gdr at cs dot tamu dot edu 2007-08-29 13:19 --- Subject: Re: Unnecessary anonymous namespace warnings "Andrew Pinski" <[EMAIL PROTECTED]> writes: | On 29 Aug 2007 03:15:04 -, bangerth at dealii dot org | <[EMAIL PROTECTED]> wrote: | > It is a good question in

Re: [Bug c++/29365] Unnecessary anonymous namespace warnings

2007-08-29 Thread Gabriel Dos Reis
"Andrew Pinski" <[EMAIL PROTECTED]> writes: | On 29 Aug 2007 03:15:04 -, bangerth at dealii dot org | <[EMAIL PROTECTED]> wrote: | > It is a good question in itself whether pimpl_ has a type at all -- it's a | > pointer to an incomplete type in any case :-) | | All types in C++ are exported (

[Bug c++/29365] Unnecessary anonymous namespace warnings

2007-08-29 Thread pinskia at gmail dot com
--- Comment #39 from pinskia at gmail dot com 2007-08-29 08:52 --- Subject: Re: Unnecessary anonymous namespace warnings On 29 Aug 2007 03:15:04 -, bangerth at dealii dot org <[EMAIL PROTECTED]> wrote: > It is a good question in itself whether pimpl_ has a type at all -- it's a > p

Re: [Bug c++/29365] Unnecessary anonymous namespace warnings

2007-08-29 Thread Andrew Pinski
On 29 Aug 2007 03:15:04 -, bangerth at dealii dot org <[EMAIL PROTECTED]> wrote: > It is a good question in itself whether pimpl_ has a type at all -- it's a > pointer to an incomplete type in any case :-) All types in C++ are exported (well except for anonymous namespace types) including inco

[Bug c++/29365] Unnecessary anonymous namespace warnings

2007-08-28 Thread bangerth at dealii dot org
--- Comment #38 from bangerth at dealii dot org 2007-08-29 03:15 --- (In reply to comment #37) > No it is not, it is still violating One definition rule as struct X > will have a different member type for pimpl_ in each TU (this violates > the whole idea of types being exported). It is

Re: [Bug c++/29365] Unnecessary anonymous namespace warnings

2007-08-28 Thread Andrew Pinski
On 28 Aug 2007 21:41:05 -, bangerth at dealii dot org <[EMAIL PROTECTED]> wrote: > That's what I thought too at first, but the request is valid anyway as long > as you never use the pointer to the class from anywhere except the one > implementation file in which the class is defined. No it is

[Bug c++/29365] Unnecessary anonymous namespace warnings

2007-08-28 Thread pinskia at gmail dot com
--- Comment #37 from pinskia at gmail dot com 2007-08-28 22:11 --- Subject: Re: Unnecessary anonymous namespace warnings On 28 Aug 2007 21:41:05 -, bangerth at dealii dot org <[EMAIL PROTECTED]> wrote: > That's what I thought too at first, but the request is valid anyway as long >

[Bug c++/29365] Unnecessary anonymous namespace warnings

2007-08-28 Thread bangerth at dealii dot org
--- Comment #36 from bangerth at dealii dot org 2007-08-28 21:40 --- (In reply to comment #35) > In this case, the warning is correct as Impl will be different in each > Translation Unit so X can never be the same between two of them. That's what I thought too at first, but the request

[Bug c++/29365] Unnecessary anonymous namespace warnings

2007-08-28 Thread pinskia at gmail dot com
--- Comment #35 from pinskia at gmail dot com 2007-08-28 20:48 --- Subject: Re: Unnecessary anonymous namespace warnings On 28 Aug 2007 19:40:14 -, pluto at agmk dot net <[EMAIL PROTECTED]> wrote: > > > --- Comment #34 from pluto at agmk dot net 2007-08-28 19:40 --- > (In

Re: [Bug c++/29365] Unnecessary anonymous namespace warnings

2007-08-28 Thread Andrew Pinski
On 28 Aug 2007 19:40:14 -, pluto at agmk dot net <[EMAIL PROTECTED]> wrote: > > > --- Comment #34 from pluto at agmk dot net 2007-08-28 19:40 --- > (In reply to comment #33) > > Fixed. > > > > one more testcase: > > $ cat X.hpp > namespace { class Impl; } > struct X > { > ~X();

[Bug c++/29365] Unnecessary anonymous namespace warnings

2007-08-28 Thread pluto at agmk dot net
--- Comment #34 from pluto at agmk dot net 2007-08-28 19:40 --- (In reply to comment #33) > Fixed. > one more testcase: $ cat X.hpp namespace { class Impl; } struct X { ~X(); Impl* pimpl_; }; $ cat X.cpp #include "X.hpp" X::~X() { } $ g++ -Wall -c X.cpp In file inclu

[Bug c++/29365] Unnecessary anonymous namespace warnings

2007-08-22 Thread jason at gcc dot gnu dot org
--- Comment #33 from jason at gcc dot gnu dot org 2007-08-22 21:50 --- Fixed. -- jason at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED

[Bug c++/29365] Unnecessary anonymous namespace warnings

2007-08-22 Thread jason at gcc dot gnu dot org
--- Comment #32 from jason at gcc dot gnu dot org 2007-08-22 20:40 --- Subject: Bug 29365 Author: jason Date: Wed Aug 22 20:40:30 2007 New Revision: 127716 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=127716 Log: PR c++/29365 * pt.c (outermost_tinst_level): New

[Bug c++/29365] Unnecessary anonymous namespace warnings

2007-08-22 Thread jason at gcc dot gnu dot org
--- Comment #31 from jason at gcc dot gnu dot org 2007-08-22 17:23 --- Subject: Bug 29365 Author: jason Date: Wed Aug 22 17:23:37 2007 New Revision: 127711 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=127711 Log: PR c++/29365 * pt.c (outermost_tinst_level): New

[Bug c++/29365] Unnecessary anonymous namespace warnings

2007-08-20 Thread jason at gcc dot gnu dot org
-- jason at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |jason at gcc dot gnu dot org |dot org

[Bug c++/29365] Unnecessary anonymous namespace warnings

2007-06-25 Thread spark at gcc dot gnu dot org
--- Comment #30 from spark at gcc dot gnu dot org 2007-06-25 18:13 --- The following patch will essentially disable the warning for template instantiations in the anonymous namespace. Index: gcc/cp/decl2.c === --- gcc/cp/de

[Bug c++/29365] Unnecessary anonymous namespace warnings

2007-06-06 Thread manu at gcc dot gnu dot org
--- Comment #29 from manu at gcc dot gnu dot org 2007-06-06 11:23 --- (In reply to comment #28) > (In reply to comment #27) > > > It is not like GCC is a closed source program either, > > you can try to make a fix for the issue too. > > Andrew, real world is not so simple ;) [snip] > c

[Bug c++/29365] Unnecessary anonymous namespace warnings

2007-06-06 Thread pluto at agmk dot net
--- Comment #28 from pluto at agmk dot net 2007-06-06 10:08 --- (In reply to comment #27) > It is not like GCC is a closed source program either, > you can try to make a fix for the issue too. Andrew, real world is not so simple ;) some time ago Manuel López-Ibáñez helps me create off

[Bug c++/29365] Unnecessary anonymous namespace warnings

2007-06-06 Thread pinskia at gcc dot gnu dot org
--- Comment #27 from pinskia at gcc dot gnu dot org 2007-06-06 09:23 --- > 4.2.1 won't have dataflow merge. we need a fix, or switch to disable > this broken feature. Seongbae knows dataflow will not be in 4.2, what he is trying to say, which I think you misunderstood, is that he will

[Bug c++/29365] Unnecessary anonymous namespace warnings

2007-06-05 Thread pluto at agmk dot net
--- Comment #26 from pluto at agmk dot net 2007-06-06 04:49 --- (In reply to comment #25) > (In reply to comment #24) > > any news? > > I have (or had, since I seem to have lost it) a patch that will prevent the > invalid warning for the template case, but it will effectively prevent th

[Bug c++/29365] Unnecessary anonymous namespace warnings

2007-06-05 Thread spark at gcc dot gnu dot org
--- Comment #25 from spark at gcc dot gnu dot org 2007-06-05 22:37 --- (In reply to comment #24) > any news? I have (or had, since I seem to have lost it) a patch that will prevent the invalid warning for the template case, but it will effectively prevent the valid warning for other tem

[Bug c++/29365] Unnecessary anonymous namespace warnings

2007-06-05 Thread pluto at agmk dot net
--- Comment #24 from pluto at agmk dot net 2007-06-05 17:26 --- (In reply to comment #23) > Confirmed. I'm working on a fix. > This is due to template instantiations marked as anonymous. any news? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29365

[Bug c++/29365] Unnecessary anonymous namespace warnings

2007-05-03 Thread aaronavay62 at aaronwl dot com
--- Comment #20 from aaronavay62 at aaronwl dot com 2007-05-03 13:00 --- It looks like this will not be backported to 4.2 as its not strictly a regression. See . If you use this sort of pimpl and anonymous namespaces or similar, and you

[Bug c++/29365] Unnecessary anonymous namespace warnings

2007-04-17 Thread gcc at user dot lysator dot liu dot se
--- Comment #19 from gcc at user dot lysator dot liu dot se 2007-04-18 06:24 --- Subject: Re: Unnecessary anonymous namespace warnings Yes, the latest patch seems to solve the problem with the ICE for me as well. Thanks. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29365

[Bug c++/29365] Unnecessary anonymous namespace warnings

2007-04-17 Thread pluto at agmk dot net
--- Comment #18 from pluto at agmk dot net 2007-04-17 17:51 --- (In reply to comment #14) > Fixed. will it be backported to 4.2 branch? -- pluto at agmk dot net changed: What|Removed |Added -

[Bug c++/29365] Unnecessary anonymous namespace warnings

2007-04-17 Thread spark at gcc dot gnu dot org
--- Comment #17 from spark at gcc dot gnu dot org 2007-04-17 17:36 --- I'm testing the following patch (which fixes the ICE). It turned out to be a latent bug in the warning code not handling pointer types correctly. Index: cp/decl2.c ===

[Bug c++/29365] Unnecessary anonymous namespace warnings

2007-04-16 Thread gcc at magfr dot user dot lysator dot liu dot se
--- Comment #16 from gcc at magfr dot user dot lysator dot liu dot se 2007-04-17 07:18 --- Created an attachment (id=13375) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13375&action=view) Test showing that the current fix causes an ICE -- http://gcc.gnu.org/bugzilla/show_bug

[Bug c++/29365] Unnecessary anonymous namespace warnings

2007-04-16 Thread gcc at magfr dot user dot lysator dot liu dot se
--- Comment #15 from gcc at magfr dot user dot lysator dot liu dot se 2007-04-17 07:15 --- I think there are still some kind of problem. If I try to compile bar.C using g++ -c bar.C then where g++ is g++ (GCC) 4.3.0 20070416 (experimental) (Hm, I'd wish for a revision number in there s

[Bug c++/29365] Unnecessary anonymous namespace warnings

2007-04-16 Thread pinskia at gcc dot gnu dot org
--- Comment #14 from pinskia at gcc dot gnu dot org 2007-04-16 19:24 --- Fixed. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added Status|NEW

[Bug c++/29365] Unnecessary anonymous namespace warnings

2007-04-16 Thread spark at gcc dot gnu dot org
--- Comment #13 from spark at gcc dot gnu dot org 2007-04-16 17:49 --- Subject: Bug 29365 Author: spark Date: Mon Apr 16 17:49:02 2007 New Revision: 123879 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123879 Log: gcc/ChangeLog: 2007-04-16 Seongbae Park <[EMAIL PROTECTED]>

[Bug c++/29365] Unnecessary anonymous namespace warnings

2007-04-04 Thread patchapp at dberlin dot org
--- Comment #12 from patchapp at dberlin dot org 2007-04-04 17:40 --- Subject: Bug number PR 29365 A patch for this bug has been added to the patch tracker. The mailing list url for the patch is http://gcc.gnu.org/ml/gcc-patches/2007-04/msg00140.html -- http://gcc.gnu.org/bugzilla/

[Bug c++/29365] Unnecessary anonymous namespace warnings

2007-04-03 Thread crowl at google dot com
--- Comment #11 from crowl at google dot com 2007-04-04 00:30 --- (In reply to comment #5) > Yes, sorry, I should have said if foo::bar is used in multiple TUs, rather > than > foo itself. If foo::bar is defined in only one TU, and is used as an opaque > type in other TUs, you're fine.

[Bug c++/29365] Unnecessary anonymous namespace warnings

2007-04-03 Thread spark at gcc dot gnu dot org
--- Comment #10 from spark at gcc dot gnu dot org 2007-04-04 00:18 --- (In reply to comment #9) > (In reply to comment #8) > > The following patch addresses the problem. > > Do we want to add a flag to control this ? > > Except if you look at the file name, you could get a case where yo

[Bug c++/29365] Unnecessary anonymous namespace warnings

2007-04-03 Thread pinskia at gcc dot gnu dot org
--- Comment #9 from pinskia at gcc dot gnu dot org 2007-04-04 00:11 --- (In reply to comment #8) > The following patch addresses the problem. > Do we want to add a flag to control this ? Except if you look at the file name, you could get a case where you are no longer warning about. -

[Bug c++/29365] Unnecessary anonymous namespace warnings

2007-04-03 Thread spark at gcc dot gnu dot org
--- Comment #8 from spark at gcc dot gnu dot org 2007-04-03 23:50 --- The following patch addresses the problem. Do we want to add a flag to control this ? --- a/gcc/cp/decl2.cMon Apr 02 15:48:00 2007 + +++ b/gcc/cp/decl2.cTue Apr 03 22:45:49 2007 + @@ -1860,9 +1860,13 @

[Bug c++/29365] Unnecessary anonymous namespace warnings

2007-03-12 Thread Woebbeking at web dot de
--- Comment #7 from Woebbeking at web dot de 2007-03-12 09:37 --- Any news on this? It's really annoying if you've many pimpls which often use anonymous namespace. -- Woebbeking at web dot de changed: What|Removed |Added ---

[Bug c++/29365] Unnecessary anonymous namespace warnings

2006-10-09 Thread bangerth at dealii dot org
--- Comment #6 from bangerth at dealii dot org 2006-10-10 03:54 --- Confirmed. The code makes sense and we shouldn't unconditionally warn. W. -- bangerth at dealii dot org changed: What|Removed |Added ---

[Bug c++/29365] Unnecessary anonymous namespace warnings

2006-10-06 Thread jason at gcc dot gnu dot org
--- Comment #5 from jason at gcc dot gnu dot org 2006-10-06 21:00 --- Yes, sorry, I should have said if foo::bar is used in multiple TUs, rather than foo itself. If foo::bar is defined in only one TU, and is used as an opaque type in other TUs, you're fine. Perhaps we should suppress t

[Bug c++/29365] Unnecessary anonymous namespace warnings

2006-10-06 Thread gcc at magfr dot user dot lysator dot liu dot se
--- Comment #4 from gcc at magfr dot user dot lysator dot liu dot se 2006-10-06 18:48 --- I still fail to understand why this would inherently violate the ODR. I agree with Andrew that if more than one translation unit sees the defintion of foo::bar then it will violate the ODR but if

[Bug c++/29365] Unnecessary anonymous namespace warnings

2006-10-06 Thread jason at gcc dot gnu dot org
--- Comment #3 from jason at gcc dot gnu dot org 2006-10-06 18:36 --- Yes. If foo is used in multiple translation units, it violates the ODR because gazonk is a different type in each translation unit. -- jason at gcc dot gnu dot org changed: What|Removed

[Bug c++/29365] Unnecessary anonymous namespace warnings

2006-10-06 Thread pinskia at gcc dot gnu dot org
--- Comment #2 from pinskia at gcc dot gnu dot org 2006-10-06 12:59 --- As I understand it, the warning is because if you have the definition of class foo::bar, you will be violating ODR for foo. -- pinskia at gcc dot gnu dot org changed: What|Removed

[Bug c++/29365] Unnecessary anonymous namespace warnings

2006-10-05 Thread gcc at magfr dot user dot lysator dot liu dot se
--- Comment #1 from gcc at magfr dot user dot lysator dot liu dot se 2006-10-06 06:09 --- Created an attachment (id=12389) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12389&action=view) foo.C - testcase -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29365