[gnu.g++.bug] non-member-function const bug

nelson@m.cs.uiuc.edu (01/24/90)

Well, a simple type leads to a bug (that should be easy to fix):

Running 1.36.3 on a Sun 3/260.

---------------------
guitar> cat test.c
class foobar {
	friend	int operator==(int a, foobar foo) const;
};

guitar> /usr/local/testbin/newg++ test.c
Failed assertion TREE_CODE (type) == METHOD_TYPE at line 5167 of `cplus-decl.c'.
/usr/local/testbin/newg++: Program cc1plus got fatal signal 6.
---------------------

Clearly, I cannot use the const since it is not a member function, but
  it should give me an error, not die mercilessly...

If you take the "const" away, everything compiles fine.