The latest java compiler (well in Fedora 7) enables -Wunused as part of -Wall. Is this such a good idea as this leads to -Wunused-parameter (a relatively common thing in O-O),
The java source compiler has been removed from gcc 4.3 so closing as won't fix.
Also I don't think unused parameters are common in OOP but in java.
This bug is refering to the command line options parser and how it maps GCC style options onto ECJ options.
ecj1 is not part of GCC.
This is a bug in the GCJ command line parser option parser, not in ECJ.
(In reply to comment #4)
> This is a bug in the GCJ command line parser option parser, not in ECJ.
Well I say it is not a bug according to the documentation :).
Really you should use -Wno-unused-paramter if you don't want the warning.
That is something for _java_ developers to decide.
Not really because this is a standard GCC option and having it different between java and other languages is wrong.
Please read the documentation before really filing a bug, really an unused parameter is wrong because it usually means either you have conditional code (which case you).
I'm reopening this. Andrew P., please leave it open if you would.
We chose what goes into -Wall, and this is a bug in the
implementation of that choice.
There were a couple of things wrong with the way this was reported, first it was reported against 4.1 which actually still has a java source compiler but then it was mentioned it was really for ecj connection.
Can people actually report against what they are really using? If they use a modified version of GCC from redhat, please report to them first and not to us, we don't always know what is going on with distro's compilers. This is the main reason why I closed it. The second reason is because the documentation is quiet clear, that this option is enable. If you don't program OOP this way, then you have the option of disabling the option, it is not like there is no option.
This is really a style issue. I can tell you how many times even in Java code this option is useful.
(In reply to comment #7)
> Not really because this is a standard GCC option and having it different
> between java and other languages is wrong.
> Please read the documentation before really filing a bug, really an unused
> parameter is wrong because it usually means either you have conditional code
> (which case you).
Actually neither -Wunused nor -Wall should enable -Wunused-parameter according to the documentation. -Wunused-parameter is only enabled by:
1) -Wunused-parameter [+ anything]
2) -Wall -Wextra
3) -Wunused -Wextra
So either Java is doing something wrong or the documentation does not reflect the actual behaviour (very likely as well).
(In reply to comment #3)
> ecj1 is not part of GCC.
Well, it should be. I just downloaded gcc4.3.0, compiled it, and tried to compile a simple test program.
$ gcj --version
gcj (GCC) 4.3.0
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ gcj Hello.java
gcj: error trying to exec 'ecj1': execvp: No such file or directory
I agree we should probably change ecj1's interpretation of -Wall.
But, ecj1 can't be part of gcc. That was already decided.
I believe the installation instructions have information on what
to download so that gcj will work properly. If not, please let me
know and I will fix that.
Unsubscribing: not sure what is to fix here.
Closing as won't fix as the Java front-end has been removed from the trunk.