Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6712344
Votes 0
Synopsis Add -errwarn=%all to Solaris Sun Studio compiles (all warnings being fatal)
Category hotspot:other
Reported Against
Release Fixed
State 11-Closed, duplicate of 6375033, request for enhancement
Priority: 3-Medium
Related Bugs
Submit Date 09-JUN-2008
Description
The hotspot Makefiles should add the Sun Studio compiler option -errwarn=%all on all C++ and C compile lines to turn all warnings into fatal errors.
Posted Date : 2008-06-09 19:36:13.0

It appears that hotspot is not asking for more warnings from the Sun Studio C++ compiler with the +w or +w2 option. I'm not sure I'd recommend the +w2 (seems a bit too noisy), but the +w option may be worth using. I did note that it issues warnings on system or compiler owned files, which isn't helpful or comfortable. By adding -errtags, the warning messages will get tagnames, and then you can add -erroff=TAG to suppress that warning.

FYI... hotspot will NOT build with -errwarn=%all now due to a few warnings, but adding +w makes it much worse.

(The option -w turns all warnings off, +w turns more warnings on).

The Sun Studio C compiler option for max warnings is -v. It uses the same -errwarn=%all to make warnings fatal.

diff -r a49545cab84a make/solaris/makefiles/sparcWorks.make
--- a/make/solaris/makefiles/sparcWorks.make    Tue May 27 09:47:18 2008 -0700
+++ b/make/solaris/makefiles/sparcWorks.make    Mon Jul 21 09:13:12 2008 -0700
@@ -437,6 +437,17 @@ VM_PICFLAG = $(VM_PICFLAG/$(LINK_INTO))
 VM_PICFLAG = $(VM_PICFLAG/$(LINK_INTO))
 CFLAGS += $(VM_PICFLAG)
 
+# Ask for more warning errors (-w2 is too noisy)
+CFLAGS += +w
+
+# Ask for error tags on error messages
+CFLAGS += -errtags
+
+# Warnings selection
+#WARNINGS_ARE_ERRORS = -errwarn=%all
+WARNING_TAG_SUPPRESSION_LIST =
+CFLAGS_WARN = $(WARNINGS_ARE_ERRORS) $(WARNING_TAG_SUPPRESSION_LIST:%=-erroff=%)
+
 # less dynamic linking (no PLTs, please)
 #LIB_FLAGS += $(LINK_MODE)
 # %%%%% despite -znodefs, -Bsymbolic gets link errors -- Rose
Posted Date : 2008-07-21 16:16:26.0
Work Around
N/A
Evaluation
N/A
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang