This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/48166] New: ICE on static member function with invalid type qualifier
- From: "martin.kronbichler at it dot uu.se" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 17 Mar 2011 12:41:13 +0000
- Subject: [Bug c++/48166] New: ICE on static member function with invalid type qualifier
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48166
Summary: ICE on static member function with invalid type
qualifier
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: martin.kronbichler@it.uu.se
Using gcc version 4.6.0 20110317 (svn revision 171087) on x86-64 Linux with the
code
struct foo {
static void func ();
};
void foo::func () const {};
and compile line "g++ -c test_static.cc" gives the following:
test_static.cc:4:19: internal compiler error: in merge_types, at
cp/typeck.c:825
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
The code is clearly invalid (g++ 4.5 indeed gives the following error message:
"test_static.cc:4:19: error: static member function âvoid foo::func()â declared
with type qualifiers"), but g++ 4.6 returns with an ICE.