public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/9801: [3.4 regression] new parser: confusing error message for missing typename
@ 2003-02-22  8:26 Gerald Pfeifer
  0 siblings, 0 replies; 3+ messages in thread
From: Gerald Pfeifer @ 2003-02-22  8:26 UTC (permalink / raw)
  To: gcc-gnats


>Number:         9801
>Category:       c++
>Synopsis:       [3.4 regression] new parser: confusing error message for missing typename
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Feb 22 08:26:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        3.4 20030221 (experimental)
>Organization:
>Environment:
System: FreeBSD acrux.dbai.tuwien.ac.at 4.7-RELEASE FreeBSD 4.7-RELEASE #0: Thu Jan 9 09:25:29 CET 2003 root@aludra.dbai.tuwien.ac.at:/usr/src/sys/compile/DBAI-MP i386


	
host: i386-unknown-freebsd4.7
build: i386-unknown-freebsd4.7
target: i386-unknown-freebsd4.7
configured with: /sw/test/gcc/cvs/configure --prefix=/sw/gcc-current --enable-languages=c,c++ --disable-checking
>Description:
	Given the following program (which lacks typename in line 12)

#include <vector>

using namespace std;

template <class T>
class TCONJUNCTION
    {
    typedef int iterator;
public:
    void get()
        {
        for( /*typename*/ TCONJUNCTION<T>::iterator i = 1; // line 12
             i != 10;
             i++ )
            { }
        }
    };

	the new parser issues the following hard error:

	  x.cc: In member function `void TCONJUNCTION<T>::get()':
	  x.cc:12: error: expected `;'
  	  x.cc:13: error: `i' has not been declared
	  x.cc:14: error: `i' has not been declared

	This is correct per se, but confusing for the average user,
	especially as previous versions of GCC did _not_ issue the
	"implicit typename" warning, or any warning for that matter,
	even with -ansi -pedantic -W -Wall.

>How-To-Repeat:
	Save program as x.cc and `g++ x.cc`.
>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted:


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

* Re: c++/9801: [3.4 regression][New parser] Confusing error message for missing typename
@ 2003-05-05  0:02 giovannibajo
  0 siblings, 0 replies; 3+ messages in thread
From: giovannibajo @ 2003-05-05  0:02 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, mmitchel, pfeifer

Synopsis: [3.4 regression][New parser] Confusing error message for missing typename

State-Changed-From-To: analyzed->closed
State-Changed-By: bajo
State-Changed-When: Mon May  5 00:02:57 2003
State-Changed-Why:
    The example is actually legal code as-is, because the
    qualifier is the injected class name. See DR 224, and
    PR c++/9634. I played a bit with the code but I did not
    find a regression in any situation similar to the one
    Gerald proposed, so I close this PR.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9801


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

* Re: c++/9801: [3.4 regression] new parser: confusing error message for missing typename
@ 2003-02-22  8:30 gerald
  0 siblings, 0 replies; 3+ messages in thread
From: gerald @ 2003-02-22  8:30 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, mmitchel, nobody, pfeifer

Synopsis: [3.4 regression] new parser: confusing error message for missing typename

Responsible-Changed-From-To: unassigned->mmitchel
Responsible-Changed-By: gerald
Responsible-Changed-When: Sat Feb 22 08:30:18 2003
Responsible-Changed-Why:
    Mark is taking care of issues related to the new parser.
    (Sorry for filing this as a PR, but I'll be offline until
    March 13th and want to avoid me forgetting it then.)
State-Changed-From-To: open->analyzed
State-Changed-By: gerald
State-Changed-When: Sat Feb 22 08:30:18 2003
State-Changed-Why:
    Verified to be a direct consequence of the new parser.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9801


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

end of thread, other threads:[~2003-05-05  0:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-22  8:26 c++/9801: [3.4 regression] new parser: confusing error message for missing typename Gerald Pfeifer
2003-02-22  8:30 gerald
2003-05-05  0:02 c++/9801: [3.4 regression][New parser] Confusing " giovannibajo

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).