[Bug c++/33969] New: [4.2/4.3 regression] ICE with const and function pointer
reichelt at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Nov 1 12:15:00 GMT 2007
The following invalid testcase triggers an ICE since GCC 4.2.0:
==========================
struct A;
void (*A::* fp)() const;
==========================
bug.cc:2: internal compiler error: tree check: expected function_type or
method_type, have pointer_type in build_memfn_type, at cp/decl2.c:119
Please submit a full bug report, [etc.]
In GCC 4.0.x and 4.1.x we issued a proper diagnostic:
bug.cc:2: error: 'const' and 'volatile' function specifiers on 'fp' invalid in
variable declaration
Before that, the code was wrongly accepted.
--
Summary: [4.2/4.3 regression] ICE with const and function pointer
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code, monitored
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33969
More information about the Gcc-bugs
mailing list