Last Comment Bug 513503 - TM: compiler warnings should cause orange on tinderbox
: TM: compiler warnings should cause orange on tinderbox
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Trunk
: x86 Mac OS X
: -- normal (vote)
: ---
Assigned To: general
:
Mentors:
Depends on:
Blocks: buildwarning 703121
  Show dependency treegraph
 
Reported: 2009-08-29 14:30 PDT by Andreas Gal :gal
Modified: 2011-11-17 17:42 PST (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Andreas Gal :gal 2009-08-29 14:30:04 PDT
Filing this as TM bug for discussion. If we all agree this can be moved to releng.

We have had for several month the following warning on gcc 4.2 and 4.4:

In file included from ../nanojit/nanojit.h:297,
                 from ../jstracer.cpp:58:
../nanojit/LIR.h: In member function ‘nanojit::LIns* nanojit::LInsOp0::getLIns()’:
../nanojit/LIR.h:336: warning: type-punning to incomplete type might break strict-aliasing rules
../nanojit/LIR.h: In member function ‘nanojit::LIns* nanojit::LInsOp1::getLIns()’:
../nanojit/LIR.h:351: warning: type-punning to incomplete type might break strict-aliasing rules
../nanojit/LIR.h: In member function ‘nanojit::LIns* nanojit::LInsOp2::getLIns()’:
../nanojit/LIR.h:368: warning: type-punning to incomplete type might break strict-aliasing rules
../nanojit/LIR.h: In member function ‘nanojit::LIns* nanojit::LInsOp3::getLIns()’:
../nanojit/LIR.h:386: warning: type-punning to incomplete type might break strict-aliasing rules
../nanojit/LIR.h: In member function ‘nanojit::LIns* nanojit::LInsLd::getLIns()’:
../nanojit/LIR.h:402: warning: type-punning to incomplete type might break strict-aliasing rules
../nanojit/LIR.h: In member function ‘nanojit::LIns* nanojit::LInsSti::getLIns()’:
../nanojit/LIR.h:420: warning: type-punning to incomplete type might break strict-aliasing rules
../nanojit/LIR.h: In member function ‘nanojit::LIns* nanojit::LInsSk::getLIns()’:
../nanojit/LIR.h:434: warning: type-punning to incomplete type might break strict-aliasing rules
../nanojit/LIR.h: In member function ‘nanojit::LIns* nanojit::LInsC::getLIns()’:
../nanojit/LIR.h:450: warning: type-punning to incomplete type might break strict-aliasing rules
../nanojit/LIR.h: In member function ‘nanojit::LIns* nanojit::LInsP::getLIns()’:
../nanojit/LIR.h:465: warning: type-punning to incomplete type might break strict-aliasing rules
../nanojit/LIR.h: In member function ‘nanojit::LIns* nanojit::LInsI::getLIns()’:
../nanojit/LIR.h:479: warning: type-punning to incomplete type might break strict-aliasing rules
../nanojit/LIR.h: In member function ‘nanojit::LIns* nanojit::LInsI64::getLIns()’:
../nanojit/LIR.h:495: warning: type-punning to incomplete type might break strict-aliasing rules
jsbuiltins.cpp

We had this one for a while too:

CLIENT -include ./js-confdefs.h -Wp,-MD,.deps/jsdate.pp ../jsdate.cpp
../jsdate.cpp: In function ‘JSBool date_parseISOString(JSString*, jsdouble*)’:
../jsdate.cpp:846: warning: comparison between signed and unsigned integer expressions
jsdbgapi.cpp

We also recently grew a new warning:

LIENT -include ./js-confdefs.h -Wp,-MD,.deps/jsobj.pp ../jsobj.cpp
../jsobj.cpp: In function ‘bool ReservedSlotIndexOK(JSContext*, JSObject*, JSClass*, uint32, uint32)’:
../jsobj.cpp:5694: warning: statement has no effect
json.cpp
g++ -m32 -o json.o -c -I./dist/system_wrappers_js -include ../config/gcc_hidden.h -DOSTYPE=\"Darwin10.0.0\" -DOSARCH=Darwin -DEXPORT_JS_API   -I.. -I. -I./dist/include -I./dist

I am sure we have a bunch of other warnings on linux and win32. This stuff keeps slipping through and nobody feels responsible to fix them. I think the only way to avoid this is using tinderbox for proper and immediate blame. Warnings can sometimes uncover pretty dangerous bugs. I think its worth it.

I am asking for this change for the JS engine component only (excluding XP connect).
Comment 1 Jeff Walden [:Waldo] (remove +bmo to email) 2009-08-31 12:18:35 PDT
Note the WARNINGS_AS_ERRORS Makefile variable used in the main Mozilla tree; if we had that in the DEBUG-build configuration that would probably substantially ease the problem without further work, although we'd have to fix our current warnings first (seems unlikely to be that difficult, we're usually warning-free).
Comment 2 Ryan VanderMeulen [:RyanVM] 2011-11-16 16:01:24 PST
WARNINGS_AS_ERRORS is enabled for js shell builds on tinderbox.

Note You need to log in before you can comment on or make changes to this bug.