🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Mark W. Eichin Tue, 14 Nov 1989 04:03
const friend method causes assertion failure (1.36.1)
#579
Author: Mark W. Eichin
Date: Tue, 14 Nov 1989 04:03
26 lines
1556 bytes
(The following fails identically on Sun 4-os4.0.3 and on vax-4.3 as
seen below; both are G++ 1.36.1) _Mark_ <eichin@athena.mit.edu>
// crash1.C
// Simple example cooked down from a mutated form of the OOPS LIBRARY.
// I *think* this is valid C++ (2.0 at least) but even so, assertions
// should never fail. Mark W. Eichin <eichin@athena.mit.edu>

class Rectangle 
{  
public:
 friend int operator*(int i) const { return 3; };
};

// the end 

charon% /mit/gnu/vaxbin/g++ -v -c crash1.C
gcc version 1.36.1 (based on GCC 1.36)
 /mit/gnu/vaxlib/gcc-cpp -+ -v -undef -D__GNUC__ -D__GNUG__ -D__cplusplus -Dvax -Dunix -D__vax__ -D__unix__ crash1.C /usr/tmp/cc005024.cpp
GNU CPP version 1.36
 /mit/gnu/vaxlib/gcc-cc1plus /usr/tmp/cc005024.cpp -quiet -dumpbase crash1.C -version -o /usr/tmp/cc005024.s
GNU C++ version 1.36.1 (based on GCC 1.36) (vax) compiled by GNU C version 1.36.
default target switches:
Failed assertion TREE_CODE (type) == METHOD_TYPE at line 4993 of `cplus-decl.c'.
/mit/gnu/vaxbin/g++: Program cc1plus got fatal signal 4.

Compilation finished at Mon Nov 13 22:59:42
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads