This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: 'otable_syms' defined but not used
- From: Jeff Sturm <jsturm at one-point dot com>
- To: Andrew Haley <aph at redhat dot com>
- Cc: Michael Koch <konqueror at gmx dot de>, Bryce McKinlay <bryce at mckinlay dot net dot nz>, <java-patches at gcc dot gnu dot org>
- Date: Mon, 22 Sep 2003 23:44:27 -0400 (EDT)
- Subject: Re: 'otable_syms' defined but not used
On Mon, 22 Sep 2003, Andrew Haley wrote:
> > 2003-09-20 Jeff Sturm <jsturm@one-point.com>
> >
> > * decl.c (java_init_decl_processing): Don't emit otable decls
> > if flag_indirect_dispatch is not set.
>
> This looks right, but I'm making a lot of changes in this area at the
> moment. I guess you might as well check it in now, altho' it'll cause
> a merge error when I come to check my stuff in.
Thanks. I've applied the patch to mainline. It saves 24 bytes on Class.o
alone when building without -findirect-dispatch. So there is a benefit
besides bogus warnings.
> I'm not sure that "defined but not used" makes any sense as part of
> -Wall in Java.
Probably not. Besides, the warning in check_global_declarations makes no
sense for Java, since every Java field will be "used" to the extent that it
cares about, due to reflection data.
> It's not unreasonable to have unused fields for future
> expansion, and we don't have the equivalent of __attribute__((unused)).
Someone, perhaps you, once mentioned using magic comments to handle
modifiers like __attribute__. I think the idea has merit as a
gcj-specific language extension.
Jeff