public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/2258
@ 2001-05-01 6:06 nathan
0 siblings, 0 replies; 4+ messages in thread
From: nathan @ 2001-05-01 6:06 UTC (permalink / raw)
To: nathan; +Cc: gcc-prs
The following reply was made to PR c++/2258; it has been noted by GNATS.
From: nathan@gcc.gnu.org
To: furboo@cybermesa.com, gcc-gnats@gcc.gnu.org, nathan@gcc.gnu.org
Cc:
Subject: Re: c++/2258
Date: 1 May 2001 12:58:16 -0000
Synopsis: using namespace std fails for endl in templated function
State-Changed-From-To: analyzed->closed
State-Changed-By: nathan
State-Changed-When: Tue May 1 08:58:16 2001
State-Changed-Why:
2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.def (USING_STMT): New statement node.
* cp-tree.h (USING_STMT_NAMESPACE): New macro.
* decl2.c (do_using_directive): Add USING_STMT to statement
tree. Don't emit errors when processing template decl.
* pt.c (tsubst_expr, USING_STMT case): New case.
* semantics.c (cp_expand_stmt, USING_STMT case): New case.
2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
* g++.old-deja/g++.ns/template17.C: New test.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=2258&database=gcc
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: c++/2258
@ 2001-05-14 14:26 Rob Lowrie
0 siblings, 0 replies; 4+ messages in thread
From: Rob Lowrie @ 2001-05-14 14:26 UTC (permalink / raw)
To: nathan; +Cc: gcc-prs
The following reply was made to PR c++/2258; it has been noted by GNATS.
From: Rob Lowrie <furboo@cybermesa.com>
To: nathan@gcc.gnu.org
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c++/2258
Date: Mon, 14 May 2001 15:24:22 -0600 (MDT)
--DonoCHoepM
Content-Type: text/plain
Content-Description: test code
Content-Disposition: inline;
filename="tst3.cc"
Content-Transfer-Encoding: 7bit
#include <vector>
#include <iostream>
template <class T> void mycout(const T& data);
// **** Uncommenting either of these will fix the problem:
// using namespace std;
// using std::vector;
template <class T>
void mycout(const T& data)
{
// ... but this by itself does not work:
using std::vector;
vector<T> a(1);
a[0] = data;
std::cout << a[0] << std::endl;
}
int main()
{
double data = 5.0;
mycout(data);
}
--DonoCHoepM
Content-Type: text/plain; charset=us-ascii
Content-Description: message body text
Content-Transfer-Encoding: 7bit
Although your fix below works for std::endl, it doesn't seem to work
for templated classes. See the attached code for an example using
std::vector.
I apologize if I should have filed a new bug report, but this
seemed very closely related to c++/2258.
-Rob
nathan@gcc.gnu.org writes:
> Synopsis: using namespace std fails for endl in templated function
>
> State-Changed-From-To: analyzed->closed
> State-Changed-By: nathan
> State-Changed-When: Tue May 1 08:58:16 2001
> State-Changed-Why:
> 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
>
> * cp-tree.def (USING_STMT): New statement node.
> * cp-tree.h (USING_STMT_NAMESPACE): New macro.
> * decl2.c (do_using_directive): Add USING_STMT to statement
> tree. Don't emit errors when processing template decl.
> * pt.c (tsubst_expr, USING_STMT case): New case.
> * semantics.c (cp_expand_stmt, USING_STMT case): New case.
> 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
>
> * g++.old-deja/g++.ns/template17.C: New test.
>
>
> http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=2258&database=gcc
>
--DonoCHoepM--
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: c++/2258
@ 2001-04-29 6:26 nathan
0 siblings, 0 replies; 4+ messages in thread
From: nathan @ 2001-04-29 6:26 UTC (permalink / raw)
To: nathan; +Cc: gcc-prs
The following reply was made to PR c++/2258; it has been noted by GNATS.
From: nathan@gcc.gnu.org
To: furboo@cybermesa.com, gcc-gnats@gcc.gnu.org, nathan@gcc.gnu.org,
nobody@gcc.gnu.org
Cc:
Subject: Re: c++/2258
Date: 29 Apr 2001 13:17:07 -0000
Synopsis: using namespace std fails for endl in templated function
Responsible-Changed-From-To: unassigned->nathan
Responsible-Changed-By: nathan
Responsible-Changed-When: Sun Apr 29 09:17:07 2001
Responsible-Changed-Why:
patch in progress
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=2258&database=gcc
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: c++/2258
@ 2001-04-27 8:46 nathan
0 siblings, 0 replies; 4+ messages in thread
From: nathan @ 2001-04-27 8:46 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c++/2258; it has been noted by GNATS.
From: nathan@gcc.gnu.org
To: furboo@cybermesa.com, gcc-gnats@gcc.gnu.org, nobody@gcc.gnu.org
Cc:
Subject: Re: c++/2258
Date: 27 Apr 2001 15:43:02 -0000
Synopsis: using namespace std fails for endl in templated function
State-Changed-From-To: open->analyzed
State-Changed-By: nathan
State-Changed-When: Fri Apr 27 11:43:02 2001
State-Changed-Why:
confirmed as a bug. I'm marking it as a 2.95 regression,
because 2.95 ignored std::
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=2258&database=gcc
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-05-14 14:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-01 6:06 c++/2258 nathan
-- strict thread matches above, loose matches on Subject: below --
2001-05-14 14:26 c++/2258 Rob Lowrie
2001-04-29 6:26 c++/2258 nathan
2001-04-27 8:46 c++/2258 nathan
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).