From owner-freebsd-bugs Thu Sep 11 04:50:05 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id EAA16303 for bugs-outgoing; Thu, 11 Sep 1997 04:50:05 -0700 (PDT) Received: (from gnats@localhost) by hub.freebsd.org (8.8.7/8.8.7) id EAA16297; Thu, 11 Sep 1997 04:50:01 -0700 (PDT) Date: Thu, 11 Sep 1997 04:50:01 -0700 (PDT) Message-Id: <199709111150.EAA16297@hub.freebsd.org> To: freebsd-bugs Cc: From: Bruce Evans Subject: Re: gnu/4511: GCC optimization broken with -m486? Reply-To: Bruce Evans Sender: owner-freebsd-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk The following reply was made to PR gnu/4511; it has been noted by GNATS. From: Bruce Evans To: FreeBSD-gnats-submit@FreeBSD.ORG, markm@iafrica.com Cc: Subject: Re: gnu/4511: GCC optimization broken with -m486? Date: Thu, 11 Sep 1997 21:44:30 +1000 >We noticed this problem when sh(1) started to misbehave. >sh objects to a line in a script that looks like > >foo=$((2 << 29)) > >>How-To-Repeat: > >[make 2.2-STABLE with CFLAGS in /etc/make.conf as above] > >cd /dev ; ./MAKEDEV I can't duplicate this. I guess the bug is actually in sh, and different flags just move it. >Workarounds: >1) remove 1 of -O2 or -m486 These flags should never have been recommended. Use -O2 only if you want to get nonstandard bugs. -m486 is worse than useless except possibly on 486's. >2) modify the offending line in the script to read >foo=$((2<<29)) > (ie remove the spaces on either side of <<) Actually 1<<29. Bruce