[19980508] g++ Internal compiler error

B. James Phillippe bryan@terran.org
Sun May 17 15:34:00 GMT 1998


% g++ --version
egcs-2.91.28
% g++ -o $TMPDIR/test $TMPDIR/test.cc
/home/bryan/tmp/test.cc:13: warning: ANSI C++ does not permit `Foo::value1' to be defined as `ALIAS::value1'
/home/bryan/tmp/test.cc:14: warning: ANSI C++ does not permit `Foo::value2' to be defined as `ALIAS::value2'
/home/bryan/tmp/test.cc:14: Internal compiler error.
/home/bryan/tmp/test.cc:14: Please submit a full bug report to `egcs-bugs@cygnus.com'.

-------------------------------------------

#include <iostream>

class Foo {

public:
	static const int value1;
	static const int value2;
	static const int value3;
};

typedef Foo ALIAS;

const int ALIAS::value1 = 5;
const int ALIAS::value2 = 10;
const int ALIAS::value3 = Foo::value1 | Foo::value2;

int main( int, char*[] ) {

	ALIAS f;
	std::cout << f.value1 << endl;
}

-bp
--
B. James Phillippe <bryan@terran.org>	* As a WA resident, I am eligible *
Linux Software Engineer, WGT Inc.	* for $500 per UCE/SPAM received. *
http://earth.terran.org/~bryan




More information about the Gcc-bugs mailing list