This is the mail archive of the gcc-bugs@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]

[Bug c++/48166] New: ICE on static member function with invalid type qualifier


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.


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