internal compiler error / egcs 1.1.1 / statics in inline functions

David L. Wagner, University of Colorado wagner@cuhep.Colorado.EDU
Fri Dec 11 15:17:00 GMT 1998


Hi,

The following code (a snippet from a larger program) produces an internal
compiler error when the function A::f() is declared inline, but compiles
correctly when "inline" is commented out:


=========================================
class A
{
public:
  inline
  void f();
};

inline
void A::f ()
{
  static int n = 0;
}

main () { }
=========================================


This is with egcs 1.1.1 on an AlphaStation 250 running Digital Unix 4.0b.
I have attached the compiler output and the ii file.  The command line I
used was:

  c++ -o test2 test2.cc

Thanks for looking into this!

-David

--
David Wagner
mailto:wagner@cuhep.colorado.edu
http://hep-www.colorado.edu/~wagner/
postal://USA/80309/CO/Boulder/Campus Box 390/David Wagner


More information about the Gcc-bugs mailing list