public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13658] New: [3.4 Regression] namespace association vs. templates part one
@ 2004-01-12 16:45 bkoz at gcc dot gnu dot org
  2004-01-12 17:38 ` [Bug c++/13658] " pinskia at gcc dot gnu dot org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2004-01-12 16:45 UTC (permalink / raw)
  To: gcc-bugs

#include <vector>

int main()
{
  // Should use vector specialization for swap, and does not.
  {
    std::vector<int> A;
    std::vector<int> B;
    std::swap(A, B); 
  }

  // Should use vector specialization for swap, and does.
  {
    using namespace std;
    vector<int> A;
    vector<int> B;
    swap(A, B); 
  }

  return 0;
}

-- 
           Summary: [3.4 Regression] namespace association vs. templates
                    part one
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bkoz at gcc dot gnu dot org
                CC: aoliva at redhat dot com,gcc-bugs at gcc dot gnu dot
                    org,jason at redhat dot com,rsandifo at redhat dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug c++/13658] [3.4 Regression] namespace association vs. templates part one
  2004-01-12 16:45 [Bug c++/13658] New: [3.4 Regression] namespace association vs. templates part one bkoz at gcc dot gnu dot org
@ 2004-01-12 17:38 ` pinskia at gcc dot gnu dot org
  2004-01-15 14:42 ` cvs-commit at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-12 17:38 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-01-12 17:38 -------
Confirmed related to bug 13659.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |critical
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |rejects-valid
   Last reconfirmed|0000-00-00 00:00:00         |2004-01-12 17:38:33
               date|                            |
   Target Milestone|---                         |3.4.0


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


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug c++/13658] [3.4 Regression] namespace association vs. templates part one
  2004-01-12 16:45 [Bug c++/13658] New: [3.4 Regression] namespace association vs. templates part one bkoz at gcc dot gnu dot org
  2004-01-12 17:38 ` [Bug c++/13658] " pinskia at gcc dot gnu dot org
@ 2004-01-15 14:42 ` cvs-commit at gcc dot gnu dot org
  2004-01-15 17:45 ` aoliva at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-01-15 14:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-01-15 14:41 -------
Subject: Bug 13658

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	aoliva@gcc.gnu.org	2004-01-15 14:41:49

Modified files:
	gcc/cp         : ChangeLog name-lookup.c 

Log message:
	PR c++/13594
	PR c++/13658
	* name-lookup.c (qualified_lookup_using_namespace): Search
	strongly-associated namespaces first, and only then try other
	namespaces.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3882&r2=1.3883
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/name-lookup.c.diff?cvsroot=gcc&r1=1.32&r2=1.33



-- 


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


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug c++/13658] [3.4 Regression] namespace association vs. templates part one
  2004-01-12 16:45 [Bug c++/13658] New: [3.4 Regression] namespace association vs. templates part one bkoz at gcc dot gnu dot org
  2004-01-12 17:38 ` [Bug c++/13658] " pinskia at gcc dot gnu dot org
  2004-01-15 14:42 ` cvs-commit at gcc dot gnu dot org
@ 2004-01-15 17:45 ` aoliva at gcc dot gnu dot org
  2004-01-25  3:16 ` [Bug c++/13658] [3.4/3.5 Regression] [testcase] " pinskia at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: aoliva at gcc dot gnu dot org @ 2004-01-15 17:45 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From aoliva at gcc dot gnu dot org  2004-01-15 17:45 -------
Should be fixed, except for the testcase, that bkoz said he'd add to the
libstdc++ testsuite.  Reassigning to him.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |bkoz at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED


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


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug c++/13658] [3.4/3.5 Regression] [testcase] namespace association vs. templates part one
  2004-01-12 16:45 [Bug c++/13658] New: [3.4 Regression] namespace association vs. templates part one bkoz at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2004-01-15 17:45 ` aoliva at gcc dot gnu dot org
@ 2004-01-25  3:16 ` pinskia at gcc dot gnu dot org
  2004-01-25 23:18 ` pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-25  3:16 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |minor
            Summary|[3.4/3.5 Regression]        |[3.4/3.5 Regression]
                   |namespace association vs.   |[testcase] namespace
                   |templates part one          |association vs. templates
                   |                            |part one


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


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug c++/13658] [3.4/3.5 Regression] [testcase] namespace association vs. templates part one
  2004-01-12 16:45 [Bug c++/13658] New: [3.4 Regression] namespace association vs. templates part one bkoz at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2004-01-25  3:16 ` [Bug c++/13658] [3.4/3.5 Regression] [testcase] " pinskia at gcc dot gnu dot org
@ 2004-01-25 23:18 ` pinskia at gcc dot gnu dot org
  2004-02-28  2:51 ` [Bug c++/13658] " mmitchel at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-25 23:18 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-01-25 23:18 -------
Can you apply the testcase and close this bug?

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |3.4.0 3.5.0


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


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug c++/13658] [testcase] namespace association vs. templates part one
  2004-01-12 16:45 [Bug c++/13658] New: [3.4 Regression] namespace association vs. templates part one bkoz at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2004-01-25 23:18 ` pinskia at gcc dot gnu dot org
@ 2004-02-28  2:51 ` mmitchel at gcc dot gnu dot org
  2004-03-01 23:19 ` bkoz at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-02-28  2:51 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-02-28 02:51 -------
Benjamin, check in the testcase already! :-)

However, not having a testcase is not going to be a showstopper, ever, so I've
removed the regression tag and cleared the target milestone.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[3.4/3.5 Regression]        |[testcase] namespace
                   |[testcase] namespace        |association vs. templates
                   |association vs. templates   |part one
                   |part one                    |
   Target Milestone|3.4.0                       |---


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


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug c++/13658] [testcase] namespace association vs. templates part one
  2004-01-12 16:45 [Bug c++/13658] New: [3.4 Regression] namespace association vs. templates part one bkoz at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2004-02-28  2:51 ` [Bug c++/13658] " mmitchel at gcc dot gnu dot org
@ 2004-03-01 23:19 ` bkoz at gcc dot gnu dot org
  2004-03-02  0:40 ` giovannibajo at libero dot it
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2004-03-01 23:19 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bkoz at gcc dot gnu dot org  2004-03-01 23:19 -------

I don't really know how to add a testcase that will test for this, off the top
of my head. I'd just checked the assembly before. It would be nice to have a
traits class that had something like is_specialized.

Ideas? Anyone?

This should not be a show-stopper.

-benjamin

-- 


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


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug c++/13658] [testcase] namespace association vs. templates part one
  2004-01-12 16:45 [Bug c++/13658] New: [3.4 Regression] namespace association vs. templates part one bkoz at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2004-03-01 23:19 ` bkoz at gcc dot gnu dot org
@ 2004-03-02  0:40 ` giovannibajo at libero dot it
  2004-03-02  0:51 ` gdr at integrable-solutions dot net
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: giovannibajo at libero dot it @ 2004-03-02  0:40 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-03-02 00:40 -------
Can't you just declare the wrong swap() and define the correct (specialized) 
swap(), and dg-link the testcase?

-- 


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


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug c++/13658] [testcase] namespace association vs. templates part one
  2004-01-12 16:45 [Bug c++/13658] New: [3.4 Regression] namespace association vs. templates part one bkoz at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2004-03-02  0:40 ` giovannibajo at libero dot it
@ 2004-03-02  0:51 ` gdr at integrable-solutions dot net
  2004-03-02  2:01 ` giovannibajo at libero dot it
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: gdr at integrable-solutions dot net @ 2004-03-02  0:51 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at integrable-solutions dot net  2004-03-02 00:51 -------
Subject: Re:  [testcase] namespace association vs. templates part one

"giovannibajo at libero dot it" <gcc-bugzilla@gcc.gnu.org> writes:

| Can't you just declare the wrong swap() and define the correct (specialized) 
| swap(), and dg-link the testcase?

I've just posted the following testcase

   #include <vector>

   struct foo { };

   namespace std {
     template<>
       struct vector<foo> {
         // no member
       };
   }

   int main()
   {
      std::vector<foo> a;
      std::vector<foo> b;
      std::swap(a, b);          // ERROR 
   }

The test fails if there is no error.

-- Gaby


-- 


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


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug c++/13658] [testcase] namespace association vs. templates part one
  2004-01-12 16:45 [Bug c++/13658] New: [3.4 Regression] namespace association vs. templates part one bkoz at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2004-03-02  0:51 ` gdr at integrable-solutions dot net
@ 2004-03-02  2:01 ` giovannibajo at libero dot it
  2004-03-02  2:10 ` gdr at integrable-solutions dot net
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: giovannibajo at libero dot it @ 2004-03-02  2:01 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-03-02 02:01 -------
Isn't that undefined behaviour, since we're at it?

-- 


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


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug c++/13658] [testcase] namespace association vs. templates part one
  2004-01-12 16:45 [Bug c++/13658] New: [3.4 Regression] namespace association vs. templates part one bkoz at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2004-03-02  2:01 ` giovannibajo at libero dot it
@ 2004-03-02  2:10 ` gdr at integrable-solutions dot net
  2004-03-02  2:27 ` giovannibajo at libero dot it
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: gdr at integrable-solutions dot net @ 2004-03-02  2:10 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at integrable-solutions dot net  2004-03-02 02:10 -------
Subject: Re:  [testcase] namespace association vs. templates part one

"giovannibajo at libero dot it" <gcc-bugzilla@gcc.gnu.org> writes:

| Isn't that undefined behaviour, since we're at it?

What?

-- Gaby


-- 


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


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug c++/13658] [testcase] namespace association vs. templates part one
  2004-01-12 16:45 [Bug c++/13658] New: [3.4 Regression] namespace association vs. templates part one bkoz at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2004-03-02  2:10 ` gdr at integrable-solutions dot net
@ 2004-03-02  2:27 ` giovannibajo at libero dot it
  2004-03-09  6:02 ` cvs-commit at gcc dot gnu dot org
  2004-04-28  5:21 ` pinskia at gcc dot gnu dot org
  13 siblings, 0 replies; 15+ messages in thread
From: giovannibajo at libero dot it @ 2004-03-02  2:27 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-03-02 02:27 -------
I had forgotten you can add specializations to namespace std, sorry for the 
noise.

-- 


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


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug c++/13658] [testcase] namespace association vs. templates part one
  2004-01-12 16:45 [Bug c++/13658] New: [3.4 Regression] namespace association vs. templates part one bkoz at gcc dot gnu dot org
                   ` (11 preceding siblings ...)
  2004-03-02  2:27 ` giovannibajo at libero dot it
@ 2004-03-09  6:02 ` cvs-commit at gcc dot gnu dot org
  2004-04-28  5:21 ` pinskia at gcc dot gnu dot org
  13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-03-09  6:02 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-03-09 06:01 -------
Subject: Bug 13658

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	bkoz@gcc.gnu.org	2004-03-09 06:01:40

Modified files:
	libstdc++-v3   : ChangeLog 
Added files:
	libstdc++-v3/testsuite/23_containers/deque/modifiers: swap.cc 
	libstdc++-v3/testsuite/23_containers/list/modifiers: swap.cc 
	libstdc++-v3/testsuite/23_containers/map/modifiers: swap.cc 
	libstdc++-v3/testsuite/23_containers/multimap/modifiers: swap.cc 
	libstdc++-v3/testsuite/23_containers/multiset/modifiers: swap.cc 
	libstdc++-v3/testsuite/23_containers/set/modifiers: swap.cc 
	libstdc++-v3/testsuite/23_containers/vector/modifiers: swap.cc 

Log message:
	2004-03-08  Benjamin Kosnik  <bkoz@redhat.com>
	
	PR c++/13658
	* testsuite/23_containers/deque/modifiers/swap.cc: New.
	* testsuite/23_containers/list/modifiers/swap.cc: New.
	* testsuite/23_containers/map/modifiers/swap.cc: New.
	* testsuite/23_containers/multimap/modifiers/swap.cc: New.
	* testsuite/23_containers/multiset/modifiers/swap.cc: New.
	* testsuite/23_containers/set/modifiers/swap.cc: New.
	* testsuite/23_containers/vector/modifiers/swap.cc: New.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&r1=1.2389&r2=1.2390
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/23_containers/deque/modifiers/swap.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/23_containers/list/modifiers/swap.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/23_containers/map/modifiers/swap.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/23_containers/multimap/modifiers/swap.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/23_containers/multiset/modifiers/swap.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/23_containers/set/modifiers/swap.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/23_containers/vector/modifiers/swap.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug c++/13658] [testcase] namespace association vs. templates part one
  2004-01-12 16:45 [Bug c++/13658] New: [3.4 Regression] namespace association vs. templates part one bkoz at gcc dot gnu dot org
                   ` (12 preceding siblings ...)
  2004-03-09  6:02 ` cvs-commit at gcc dot gnu dot org
@ 2004-04-28  5:21 ` pinskia at gcc dot gnu dot org
  13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-28  5:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-04-28 02:17 -------
Fixed for 3.4.0, testcases applied on the mainline (3.5.0).

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |3.4.0


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


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2004-04-28  2:17 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-12 16:45 [Bug c++/13658] New: [3.4 Regression] namespace association vs. templates part one bkoz at gcc dot gnu dot org
2004-01-12 17:38 ` [Bug c++/13658] " pinskia at gcc dot gnu dot org
2004-01-15 14:42 ` cvs-commit at gcc dot gnu dot org
2004-01-15 17:45 ` aoliva at gcc dot gnu dot org
2004-01-25  3:16 ` [Bug c++/13658] [3.4/3.5 Regression] [testcase] " pinskia at gcc dot gnu dot org
2004-01-25 23:18 ` pinskia at gcc dot gnu dot org
2004-02-28  2:51 ` [Bug c++/13658] " mmitchel at gcc dot gnu dot org
2004-03-01 23:19 ` bkoz at gcc dot gnu dot org
2004-03-02  0:40 ` giovannibajo at libero dot it
2004-03-02  0:51 ` gdr at integrable-solutions dot net
2004-03-02  2:01 ` giovannibajo at libero dot it
2004-03-02  2:10 ` gdr at integrable-solutions dot net
2004-03-02  2:27 ` giovannibajo at libero dot it
2004-03-09  6:02 ` cvs-commit at gcc dot gnu dot org
2004-04-28  5:21 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).