public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/7841: gcc accepts illegal member function syntax for template classes
@ 2002-09-05 13:16 bangerth
0 siblings, 0 replies; 4+ messages in thread
From: bangerth @ 2002-09-05 13:16 UTC (permalink / raw)
To: gcc-gnats
>Number: 7841
>Category: c++
>Synopsis: gcc accepts illegal member function syntax for template classes
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Sep 05 13:16:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Wolfgang Bangerth
>Release: unknown-1.0
>Organization:
>Environment:
Linux, gcc2.95 through to 3.2
>Description:
gcc accepts the following bogus definition of a
member of a template class (note the second occurence
of the template arg after the _funtion_ name -- since this
is not a member template, this is clearly not ok):
-----------------------------------------
template <int dim> class X { X(); };
template <int dim> X<dim>::X<dim> () {};
----------------------------^^^^^--------
Since this does not prevent one from anything else,
I rated this bug into the lowest category :-)
Regards
Wolfgang
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: c++/7841: gcc accepts illegal member function syntax for template classes
@ 2002-09-13 9:31 lerdsuwa
0 siblings, 0 replies; 4+ messages in thread
From: lerdsuwa @ 2002-09-13 9:31 UTC (permalink / raw)
To: bangerth, gcc-bugs, gcc-prs, nobody
Synopsis: gcc accepts illegal member function syntax for template classes
State-Changed-From-To: open->closed
State-Changed-By: lerdsuwa
State-Changed-When: Fri Sep 13 09:31:22 2002
State-Changed-Why:
Not a bug. According to example in 14.6.1 p1, the constructor for Set can be referred to as Set() or Set<T>().
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7841
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: c++/7841: gcc accepts illegal member function syntax for template classes
@ 2002-09-17 11:26 Martin Sebor
0 siblings, 0 replies; 4+ messages in thread
From: Martin Sebor @ 2002-09-17 11:26 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c++/7841; it has been noted by GNATS.
From: Martin Sebor <sebor@roguewave.com>
To: gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org,
bangerth@ticam.utexas.edu, gcc-bugs@gcc.gnu.org
Cc:
Subject: Re: c++/7841: gcc accepts illegal member function syntax for template classes
Date: Tue, 17 Sep 2002 12:15:08 -0600
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7841
14.6.1, p1 talks about references to unqualfied names of templates,
which inevitably excludes declarations that appear outside of the
class template definition. Also, examples are not normative :)
The test case is ill-formed according to 14.2, p2 and must be
diagnosed by a conforming implementation.
Regards
Martin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: c++/7841: gcc accepts illegal member function syntax for template classes
@ 2002-09-19 7:10 lerdsuwa
0 siblings, 0 replies; 4+ messages in thread
From: lerdsuwa @ 2002-09-19 7:10 UTC (permalink / raw)
To: bangerth, gcc-bugs, gcc-prs, nobody
Synopsis: gcc accepts illegal member function syntax for template classes
State-Changed-From-To: closed->analyzed
State-Changed-By: lerdsuwa
State-Changed-When: Thu Sep 19 07:10:15 2002
State-Changed-Why:
It's indeed a bug.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7841
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-09-19 14:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-05 13:16 c++/7841: gcc accepts illegal member function syntax for template classes bangerth
2002-09-13 9:31 lerdsuwa
2002-09-17 11:26 Martin Sebor
2002-09-19 7:10 lerdsuwa
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).