Afloyd.180 net.unix-wizards utzoo!decvax!harpo!floyd!trb Fri Apr 30 16:45:36 1982 Caveat Hackor (cc generates bad code for int *= float) Paul Gloudemans (floyd!prg) found this problem in VAX cc on both 4.1bsd and BTL 4.0. ----- /* bug.c */ main() { float z; int n; n=2; z=3.5; n *= z; printf("n=%d, should be 7!\n"); } % cc bug.c % a.out n=6, should be 7! % ----- Andy Tannenbaum Bell Labs Whippany, NJ (201) 386-6491 ----------------------------------------------------------------- gopher://quux.org/ conversion by John Goerzen of http://communication.ucsd.edu/A-News/ This Usenet Oldnews Archive article may be copied and distributed freely, provided: 1. There is no money collected for the text(s) of the articles. 2. The following notice remains appended to each copy: The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996 Bruce Jones, Henry Spencer, David Wiseman.