Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!pacbell!att-ih!ihnp4!ihlpf!nevin1 From: nevin1@ihlpf.ATT.COM (00704a-Liber) Newsgroups: comp.lang.c++ Subject: Re: C++ releases from AT&T? Message-ID: <4214@ihlpf.ATT.COM> Date: 31 Mar 88 01:03:41 GMT References: <254@piring.cwi.nl> Reply-To: nevin1@ihlpf.UUCP (00704a-Liber,N.J.) Organization: AT&T Bell Laboratories - Naperville, Illinois Lines: 51 In article <254@piring.cwi.nl> guido@cwi.nl (Guido van Rossum) writes: >PS: I asked about the official status of unreachable code elimination by >the translator earlier, but didn't get useful replies So, anybody care >to comment on the question of what happens to code after >"if (constant-expression-evaluating-to-zero) ..." ? I don't know what the *official* status on "if (constant-expression-evaluating-to-zero) ..." is, but at least on our translator, it seems to eliminate it (see below). I wrote a little test program: /********************************************************************/ void exit(int); int main() { if (1-1) exit(1); //unreachable exit(0); } /********************************************************************/ which cfront 1.2.3 translated into the following: /********************************************************************/ /* <> */ /* < test.c */ char *_new(); char _delete(); char *_vec_new(); char _vec_delete(); char exit (); int main (){ _main(); { ; exit ( (int )0 ) ; } }; /* the end */ /********************************************************************/ Hope this helps, -- _ __ NEVIN J. LIBER ..!ihnp4!ihlpf!nevin1 (312) 510-6194 ' ) ) "The secret compartment of my ring I fill / / _ , __o ____ with an Underdog super-energy pill." / (_