Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!jarthur!uci-ics!gateway From: rfg@paris.ics.uci.edu (Ronald Guilmette) Newsgroups: comp.std.c Subject: Does ANSI insist this is legal? Message-ID: <25EB8750.5286@paris.ics.uci.edu> Date: 28 Feb 90 08:09:52 GMT Organization: UC Irvine Department of ICS Lines: 17 Must a strictly conforming ANSI C implementation be able to generate an executable program from the following? int main (); short s = (short) &main; char c = (char) &main; int main () { return 0; } The above code makes SystemV assemblers croak and it makes BSD linkers croak. // Ron Guilmette (rfg@ics.uci.edu) // C++ Entomologist // Motto: If it sticks, force it. If it breaks, it needed replacing anyway.