Path: utzoo!attcan!uunet!lll-winken!brutus.cs.uiuc.edu!jarthur!uci-ics!gateway From: rfg@paris.ics.uci.edu (Ronald Guilmette) Newsgroups: comp.lang.c++ Subject: cfront 2.0 bug 900321_02 Message-ID: <2608085A.356@paris.ics.uci.edu> Date: 21 Mar 90 23:03:54 GMT Organization: UC Irvine Department of ICS Lines: 31 // 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.