Article View: comp.std.c
Article #6246Does ANSI insist this is legal?
From: Ronald Guilmette
Date: Wed, 28 Feb 1990 08:09
Date: Wed, 28 Feb 1990 08:09
17 lines
771 bytes
771 bytes
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.
Technical Details
Message-ID:
<25EB8750.5286@paris.ics.uci.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!jarthur!uci-ics!gatewayShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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