🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #2351

constant folding bug

#2351
From: Dave Hanson
Date: Thu, 23 Feb 1989 14:38
13 lines
1023 bytes
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.
Technical Details
Message-ID: <15133@princeton.Princeton.EDU>
Path: arc1-ca.pugleaf.net!utzoo!telly!attcan!uunet!tut.cis.ohio-state.edu!mailrus!rutgers!njin!princeton!notecnirp!drh

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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