public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/57: [parser] templates in default arguments
@ 2002-10-22 16:56 Wolfgang Bangerth
0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Bangerth @ 2002-10-22 16:56 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c++/57; it has been noted by GNATS.
From: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
To: nathan@codesourcery.com, <gcc-bugs@gcc.gnu.org>, <gcc-gnats@gcc.gnu.org>
Cc:
Subject: Re: c++/57: [parser] templates in default arguments
Date: Tue, 22 Oct 2002 18:47:32 -0500 (CDT)
Nathan,
the following code has, if I recall correctly, invalid syntax:
---------------------------------------------
template <class T, class U>
struct A {
static const int n = 0;
};
template <class T>
struct B
{
template <class U>
void foo (int = A<T, U>::n) { }
};
---------------------------------------------
In the default argument parsing, there's a "," not nested inside
parentheses. This stops default argument parsing. If you agree, then this
report should be closed.
Regards
Wolfgang
-------------------------------------------------------------------------
Wolfgang Bangerth email: bangerth@ticam.utexas.edu
www: http://www.ticam.utexas.edu/~bangerth
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: c++/57: [parser] templates in default arguments
@ 2002-10-24 12:46 Neil Booth
0 siblings, 0 replies; 5+ messages in thread
From: Neil Booth @ 2002-10-24 12:46 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c++/57; it has been noted by GNATS.
From: Neil Booth <neil@daikokuya.co.uk>
To: Nathan Sidwell <nathan@codesourcery.com>
Cc: Wolfgang Bangerth <bangerth@ticam.utexas.edu>, gcc-bugs@gcc.gnu.org,
gcc-gnats@gcc.gnu.org
Subject: Re: c++/57: [parser] templates in default arguments
Date: Thu, 24 Oct 2002 20:43:41 +0100
Nathan Sidwell wrote:-
> >I think I recall there was a defect report about this, but I can't seem to
> >find it anymore, and I also don't recall whether it was resolved either
> >way or other ...
> 325. http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/cwg_active.html#325
> I'm surprised comeau accepts your example, Neil, because I experimented
> with the EDG frontend too.
I just used their on-line compiler. The only compiler I "own" is GCC
8-)
Neil.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: c++/57: [parser] templates in default arguments
@ 2002-10-24 0:56 Nathan Sidwell
0 siblings, 0 replies; 5+ messages in thread
From: Nathan Sidwell @ 2002-10-24 0:56 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c++/57; it has been noted by GNATS.
From: Nathan Sidwell <nathan@codesourcery.com>
To: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
Cc: Neil Booth <neil@daikokuya.co.uk>, gcc-bugs@gcc.gnu.org,
gcc-gnats@gcc.gnu.org
Subject: Re: c++/57: [parser] templates in default arguments
Date: Thu, 24 Oct 2002 08:48:36 +0100
Wolfgang Bangerth wrote:
>>> void foo (int = A<T, U>::n) { }
>>>---------------------------------------------
>>>In the default argument parsing, there's a "," not nested inside
>>>parentheses. This stops default argument parsing. If you agree, then this
>>>report should be closed.
>>
>>FWIW Comeau accepts it in strict conforming mode.
>
>
> I think I recall there was a defect report about this, but I can't seem to
> find it anymore, and I also don't recall whether it was resolved either
> way or other ...
325. http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/cwg_active.html#325
I'm surprised comeau accepts your example, Neil, because I experimented
with the EDG frontend too.
nathan
--
Dr Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: c++/57: [parser] templates in default arguments
@ 2002-10-23 18:16 Wolfgang Bangerth
0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Bangerth @ 2002-10-23 18:16 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c++/57; it has been noted by GNATS.
From: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
To: Neil Booth <neil@daikokuya.co.uk>
Cc: nathan@codesourcery.com, <gcc-bugs@gcc.gnu.org>, <gcc-gnats@gcc.gnu.org>
Subject: Re: c++/57: [parser] templates in default arguments
Date: Wed, 23 Oct 2002 20:10:32 -0500 (CDT)
> > void foo (int = A<T, U>::n) { }
> > ---------------------------------------------
> > In the default argument parsing, there's a "," not nested inside
> > parentheses. This stops default argument parsing. If you agree, then this
> > report should be closed.
>
> FWIW Comeau accepts it in strict conforming mode.
I think I recall there was a defect report about this, but I can't seem to
find it anymore, and I also don't recall whether it was resolved either
way or other ...
Wolfgang
-------------------------------------------------------------------------
Wolfgang Bangerth email: bangerth@ticam.utexas.edu
www: http://www.ticam.utexas.edu/~bangerth
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: c++/57: [parser] templates in default arguments
@ 2002-10-23 12:36 Neil Booth
0 siblings, 0 replies; 5+ messages in thread
From: Neil Booth @ 2002-10-23 12:36 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c++/57; it has been noted by GNATS.
From: Neil Booth <neil@daikokuya.co.uk>
To: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
Cc: nathan@codesourcery.com, gcc-bugs@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Subject: Re: c++/57: [parser] templates in default arguments
Date: Wed, 23 Oct 2002 20:31:03 +0100
Wolfgang Bangerth wrote:-
>
> Nathan,
> the following code has, if I recall correctly, invalid syntax:
> ---------------------------------------------
> template <class T, class U>
> struct A {
> static const int n = 0;
> };
>
> template <class T>
> struct B
> {
> template <class U>
> void foo (int = A<T, U>::n) { }
> };
> ---------------------------------------------
> In the default argument parsing, there's a "," not nested inside
> parentheses. This stops default argument parsing. If you agree, then this
> report should be closed.
FWIW Comeau accepts it in strict conforming mode.
Neil.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-10-24 19:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-22 16:56 c++/57: [parser] templates in default arguments Wolfgang Bangerth
2002-10-23 12:36 Neil Booth
2002-10-23 18:16 Wolfgang Bangerth
2002-10-24 0:56 Nathan Sidwell
2002-10-24 12:46 Neil Booth
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).