c++/4249: Trouble with static templated member functions

reichelt@igpm.rwth-aachen.de reichelt@igpm.rwth-aachen.de
Thu Sep 6 08:56:00 GMT 2001

>Number:         4249
>Category:       c++
>Synopsis:       Trouble with static templated member functions
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Thu Sep 06 08:56:01 PDT 2001
>Originator:     Volker Reichelt
>Release:        gcc 3.0.2 (prerelease snapshot 20010903), gcc 3.0.1, gcc 2.95.3
mips-sgi-irix6.5, i686-pc-linux-gnu
The following (legal) code snippet crashes various versions
of g++:

struct A
    void f();
    template <class T> static void g();

struct B {};

void h( void (*)() );

void A::f()

with the following error message:

Bug.cpp: In member function `void A::f()':
Bug.cpp:13: Internal compiler error in c_expand_expr, at c-common.c:4121
Please submit a full bug report, [...]
g++ -c Bug.cpp


More information about the Gcc-bugs mailing list