rfg@paris.ics.uci.edu (Ronald Guilmette) (03/22/90)
// cfront 2.0 bug 900321_02
// The following code causes cfront 2.0 to generate blatantly invalid C
// code. (I say "blatant" because it is not a question of ANSI vs.
// non-ANSI C or anything like that. It is just plain wrong.)
// The problem is that the mangled names of these pairs of function
// definitions conflict (i.e. each pair shown below mangles to the same
// mangled-name).
// g++ manages to avoid getting into this kind of trouble by simply
// disallowing such pairs of function definitions. I believe that these
// should be allowed, and that the cfront 2.0 implementation just needs a
// bit of fixing (but that's just one man's opinion).
struct s;
typedef struct s T;
typedef T array_of_Ts[];
void function_0 (T* *) { }
void function_0 (array_of_Ts *) { }
void function_1 (T* &) { }
void function_1 (array_of_Ts &) { }
int main () { return 0; }
// Ron Guilmette (rfg@ics.uci.edu)
// C++ Entomologist
// Motto: If it sticks, force it. If it breaks, it needed replacing anyway.