This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Patch: -Wunreachable-bytecode
> >>>>> "Per" == Per Bothner <per@bothner.com> writes:
>
> Per> Why do we want to supress it? Is it unreachable bytecode in
> Per> .class files generated by gcj?
>
> Yes. The appended file causes gcj to emit an unused instruction.
At -O0 we can generate unreachable code in some cases. This can be
cared by calling cfg_cleanup unconditionally at bb_reorder time.
Honza
>
> Tom
>
> public class zt
> {
> public boolean arrayEquals(Object[] o1, Object[] o2)
> {
> // We assume ordering is important.
> for (int i = 0; i < o1.length; i++)
> if (o1[i] instanceof Object[])
> {
> if (o2[i] instanceof Object[])
> {
> if (!arrayEquals((Object[])o1[i], (Object[])o2[i]))
> return(false);
> }
> else
> return(false);
> }
> else
> if (!o1[i].equals(o2[i]))
> return(false);
>
> return(true);
> }
> }