Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!caip!brl-adm!brl-smoke!smoke!rgenter@BBN-LABS-B.ARPA From: rgenter@BBN-LABS-B.ARPA (Rick Genter) Newsgroups: net.lang.c Subject: Re: Failure of \"long x(cp) char * cp; { return *((long *) cp); }\" is a bug? Message-ID: <1810@brl-smoke.ARPA> Date: Sun, 29-Jun-86 15:54:14 EDT Article-I.D.: brl-smok.1810 Posted: Sun Jun 29 15:54:14 1986 Date-Received: Mon, 30-Jun-86 05:58:55 EDT Sender: news@brl-smoke.ARPA Lines: 19 I don't think you can call that a compiler bug. There are machines where returning the long pointed at by a character pointer makes no sense (e.g., PDP-10). This is one of those cases that lint calls questionable, and rightfully so. In any case, you provided a cast, which implies that "you know what you are doing." It's no more a compiler bug for your example to trap than it is for main () { * (long *) main = 0x12345678; } to trap on any machine that protects text space from user writes. -------- Rick Genter BBN Laboratories Inc. (617) 497-3848 10 Moulton St. 6/512 rgenter@labs-b.bbn.COM (Internet new) Cambridge, MA 02238 rgenter@bbn-labs-b.ARPA (Internet old) linus!rgenter%BBN-LABS-B.ARPA (UUCP)