[gcjx] Patch: FYI: compiling gcj front end

Ranjit Mathew rmathew@gmail.com
Mon Oct 10 06:28:00 GMT 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tom Tromey wrote:
> I'm checking this in on the gcjx branch.
> 
> This makes it possible to compile the gcj front end again.

[...]

> 	* tree.cc (visit_field_ref): Removed 'const'.
> 	(visit_method_invocation): Likewise.

I *did* make those changes along with the patch to implement
the pretty-printer:

http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/Attic/tree.hh.diff?r1=1.1.2.15&r2=1.1.2.16&only_with_tag=gcjx-branch

I think you refreshed your tree just in the window it took
me to apply my "gcjx" patch followed by the "gcc/java" patch. :-/

I had to remove these "const" qualifiers in a few visitor
methods because when I wrote "foo->visit (this)", the
compiler complained about it since visit() was not a "const"
method. My choices were to either add the "const" qualifiers
to all the visit_xxx() methods or remove the "const" from
these parameters. I took the latter option not only because
it was simpler to implement and I am lazy, but also because
I was not totally sure if tree walkers were not supposed to
modify the tree while walking.

I now realise that visiting these "model_method *" or "model_field *"
would be redundant and we could just print their names in the
pretty-printer. I was therefore going to add back the "const"
qualifiers, but now I see that you're actually using this to
remove const_cast from some places.

So I don't think I should add back these qualifiers, no?

Thanks,
Ranjit.

- --
Ranjit Mathew      Email: rmathew AT gmail DOT com

Bangalore, INDIA.    Web: http://ranjitmathew.hostingzero.com/


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDSgoBYb1hx2wRS48RAoToAKCmXARpqdswLi0WJMyJIoHRgfJIfgCgj1Fw
fghMI+4bwwjCij5aWmKYqLo=
=PjWc
-----END PGP SIGNATURE-----



More information about the Java-patches mailing list