Bug 28533 - [ecj] Default warnings
Summary: [ecj] Default warnings
Status: ASSIGNED
Alias: None
Product: gcc
Classification: Unclassified
Component: java (show other bugs)
Version: unknown
: P3 normal
Target Milestone: ---
Assignee: Tom Tromey
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-29 15:00 UTC by Mark Wielaard
Modified: 2006-07-31 16:29 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-07-31 16:29:06


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Wielaard 2006-07-29 15:00:38 UTC
ecj has a lot of default warnings on that are a bit obnoxious. It would be nice to have a set of default warnings that people would actually use (currently it seems people just disable them all).

GNU Classpath for example disables all the following to get more sane warning results: -warn:-deprecation,serial,typeHiding,unchecked,unused,varargsCast

Especially the serial and unused (imports) warnings don't add much value since they cannot point out any coding mistake. They would be nice options for a lint like tool though.
Comment 1 Benjamin Kosnik 2006-07-29 15:41:16 UTC
Is there a way to map ecj's warnings options onto gcc's existing warning flags?

-w
-W
-Wextra

?

deprecation == -Wno-deprecated-declarations
serial == ??
typeHiding == -Wshadow
unchecked == ?
unused == -Wunused (but for importing packages, hmmm)
varargsCast == ?
Comment 2 Tom Tromey 2006-07-31 16:29:06 UTC
Yes, the current 'ecj1' driver translates gnu-style options to eclipse-style
options.  So instead of funkyCaseWarning we have funky-case-warning, etc.
Also we accept some "legacy" warning names, -Wno-foo, and the like.
I didn't look too much at supporting names similar to what the rest of GCC
supports, but this is a good idea.