This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Fix PR c++/27821


Hi,

The C++ front-end currently ICE's with an assertion failure in
build_ptrmem_type with the following invalid testcase:

struct A
{
   template<void (A::*)()> struct B {};
   void ::foo();
   B<&A::foo> b;
};

The proposed patch fixes the ICE by returning error_mark_node from
inside grokdeclarator when an invalid use of "::" is detected.

Bootstrapped and regresstion tested on i686-pc-linux-gnu with no new
failures. Ok for mainline?

Cheers,
Lee.

:ADDPATCH c++:

cp/

2006-06-18 Lee Millward <lee.millward@gmail.com>

	PR c++/27821
	* decl.c (grokdeclarator): Return error_mark_node
	on invalid uses of the scope resolution operator.

testsuite/

2006-06-18 Lee Millward <lee.millward@gmail.com>

	PR c++/27821
	* g++.dg/template/error22.C: New test.

Attachment: pr27821.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]