Closed Bug 387 Opened 26 years ago Closed 24 years ago

warnings when compiling jsmath.c in javascript ref

Categories

(Core :: JavaScript Engine, defect, P3)

x86
Linux
defect

Tracking

()

VERIFIED WONTFIX

People

(Reporter: t92mas, Assigned: mike+mozilla)

Details

Created by (t92mas@student.tdb.uu.se) on Thursday, May 21, 1998 6:38:11 AM PDT Additional Details : Warnings: gcc -Wall -Wno-format -o Linux_All_DBG.OBJ/jsmath.o -c -g -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DLINUX -DDEBUG -DDEBUG_magnus -ILinux_All_DBG.OBJ -DJSFILE jsmath.c jsmath.c: In function `random_init': jsmath.c:256: warning: left shift count >= width of type jsmath.c:265: warning: left shift count >= width of type jsmath.c:265: warning: left shift count >= width of type jsmath.c:265: warning: right shift count is negative jsmath.c:269: warning: left shift count >= width of type jsmath.c:269: warning: left shift count >= width of type jsmath.c:269: warning: right shift count is negative Updated by Mike McCabe (mccabe@netscape.com) on Tuesday, May 26, 1998 10:46:16 PM PDT Additional Details : Thanks for looking at this. Keeping the js engine as warning-free as possible is a goal. This particular warning came up a while ago... I don't remember the details, but I do remember that we decided to ignore it. gcc is complaining about dead code here - the compiler warning mechanism kicks in before the dead code elimination does. Brendan had a fix that removed the warning at the cost of a runtime check, but decided that it was really more of a problem with gcc than with javascript, and didn't justify the workaround. Esthetic arguments should be directed to brendan@mozilla.org.
Changing component to "Javascript Engine". "Javascript" component is being retired.
[mass change] these bugs are closed but have no resolution. reopening...
Status: CLOSED → REOPENED
marking as wontfix.
Status: REOPENED → RESOLVED
Closed: 24 years ago
Resolution: --- → WONTFIX
VERIFIED due to more than 365 days since last change
Status: RESOLVED → VERIFIED
jsmath.c: In function `random_init': jsmath.c:332: warning: right shift count is negative jsmath.c:336: warning: right shift count is negative i'm just a bit curious about these (first noticed them on doppler/darwin).
QA Contact: pschwartau
It looks like you should only get those warnings when 1) you don't have real long longs 2) you shift left by at least 32 bits 3) your compiler generates warnings for macro expanded code before eliminating dead code in an |if| never taken
You need to log in before you can comment on or make changes to this bug.