Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!brutus.cs.uiuc.edu!ux1.cso.uiuc.edu!ux1.cso.uiuc.edu!m.cs.uiuc.edu!nelson From: nelson@m.cs.uiuc.edu Newsgroups: gnu.g++.bug Subject: non-member-function const bug Message-ID: <53300016@m.cs.uiuc.edu> Date: 23 Jan 90 17:41:03 GMT Lines: 20 Nf-ID: #N:m.cs.uiuc.edu:53300016:000:598 Nf-From: m.cs.uiuc.edu!nelson Jan 22 20:08:00 1990 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.