Path: utzoo!telly!attcan!uunet!tut.cis.ohio-state.edu!mailrus!rutgers!njin!princeton!notecnirp!drh From: drh@notecnirp.Princeton.EDU (Dave Hanson) Newsgroups: gnu.gcc.bug Subject: constant folding bug Message-ID: <15133@princeton.Princeton.EDU> Date: 23 Feb 89 14:38:43 GMT Sender: news@princeton.Princeton.EDU Reply-To: drh@princeton.Princeton.EDU (Dave Hanson) Distribution: gnu Organization: Dept. of Computer Science, Princeton University Lines: 13 the following legal C program is taken from the bottom of p. 57 in the 12/7/88 ANSI standard and elicits an error from gcc. % cat bug1.c int x = 2 || 1/0; % gcc -v -S bug1.c gcc version 1.33 /usr/local/gnu/lib/gcc-cpp -v -undef -D__GNUC__ -Dvax -Dunix -D__vax__ -D__unix__ bug1.c /tmp/cc022968.cpp GNU CPP version 1.33 /usr/local/gnu/lib/gcc-cc1 /tmp/cc022968.cpp -quiet -dumpbase bug1.c -version -o bug1.s GNU C version 1.33 (vax) compiled by GNU C version 1.33. bug1.c:1: divide by 0 in constant folding - quotient and remainder set to 0.