PATCH: Re: Fwd: Typo in online GCJ docs.
Bryce McKinlay
mckinlay@redhat.com
Thu Apr 21 00:08:00 GMT 2005
Thanks for the fixes, Thomas. I'm checking in this docs patch. In
future, you can submit patches directly against gcj.texi if you like.
Regards
Bryce
2005-04-20 Bryce McKinlay <mckinlay@redhat.com>
* gcj.texi: Fix typos and bogus example.
--- gcj.texi 7 Apr 2005 15:48:02 -0000 1.80
+++ gcj.texi 21 Apr 2005 00:05:37 -0000
@@ -1546,7 +1546,7 @@
reference to the object points to the dispatch table pointer.)
The fields are laid out in the same order, alignment, and size as in
-C++. Specifically, 8-bite and 16-bit native types (@code{byte},
+C++. Specifically, 8-bit and 16-bit native types (@code{byte},
@code{short}, @code{char}, and @code{boolean}) are @emph{not} widened
to 32 bits. Note that the Java VM does extend 8-bit and 16-bit types
to 32 bits when on the VM stack or temporary registers.
@@ -1560,7 +1560,7 @@
@{
public int i;
public Integer (int i) @{ this.i = i; @}
- public static zero = new Integer(0);
+ public static Int zero = new Int(0);
@}
@end example
@@ -1630,7 +1630,7 @@
Accessing a static field also requires the class of the
field to be initialized. The Java compiler will generate code
-to call @code{Jv_InitClass} before getting or setting the field.
+to call @code{JvInitClass} before getting or setting the field.
However, the C++ compiler will not generate this extra code,
so it is your responsibility to make sure the class is
initialized before you access a static field from C++.
Mike Stump wrote:
> From the gcc list:
>
> Begin forwarded message:
>
>> From: Thomas Zander <zander@kde.org>
>> Date: April 20, 2005 4:11:32 PM PDT
>> To: gcc@gnu.org
>> Subject: Typo in online GCJ docs.
>>
>>
>> In page:
>> http://gcc.gnu.org/onlinedocs/gcj/Objects-and-Classes.html
>>
>> - Specifically, 8-bite and 16-bit native types
>> + Specifically, 8-bit and 16-bit native types
>>
>> On the same page there is a Java example that will not compile, I
>> found and
>> fixed 3 bugs; Please replace with:
>> public class Int
>> {
>> public int i;
>> public Int(int i) { this.i = i; }
>> public static Int zero = new Int(0);
>> }
>>
>>
>> On page:
>> http://gcc.gnu.org/onlinedocs/gcj/Class-Initialization.html
>> Both JvInitClass and Jv_InitClass are used; which one is it?
>>
>> Please forward to the maintainer or if you can, fix it in the source.
>> Thanks!
>>
>> --
>> Thomas Zander
>>
>
More information about the Java
mailing list