[PATCH][C++] Make __java_boolean a true bool (PR 33887)

Andrew Haley aph@redhat.com
Tue Jan 29 15:15:00 GMT 2008


Richard Guenther wrote:
> On Tue, 29 Jan 2008, Andrew Haley wrote:
> 
>> Andreas Tobler wrote:
>>> Andreas Tobler wrote:
>>>> Richard Guenther wrote:
>>>>> This makes the fix for PR33887 safer in that __java_boolean is treated
>>>>> the same as C++ bool.  This is especially important for its special
>>>>> semantics on increment.
>>>>>
>>>>> Bootstrap and testing on x86_64-unknown-linux-gnu, ok if that passes?
>>>>>
>>>>> Thanks,
>>>>> Richard.
>>>>>
>>>>> 2008-01-21  Richard Guenther  <rguenther@suse.de>
>>>>>
>>>>>     PR c++/33887
>>>>>     * decl.c (record_builtin_java_type): Make __java_boolean
>>>>>     a variant of bool.
>>>>>     * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
>>>>>     after TYPE_MAIN_VARIANT check.
>>>> This one causes these libjava regressions on ppc-darwin:
>>>>
>>>> http://gcc.gnu.org/ml/gcc-testresults/2008-01/msg01414.html
>>>>
>>>> Unfortunately it took me some time to discover since bootstrap time is
>>>> growing.... I can only do a bootstrap every other day. The cycle increased
>>>> to 24h :(
> 
> ppc64-linux -m32/-m64 seem to be fine:
> http://gcc.gnu.org/ml/gcc-testresults/2008-01/msg01406.html
> 
> most other people seem to omit libjava from their regular tests :(
> 
> As I don't see how boolean type can be darwin specific, I need your
> help in tracking it down.  Note that without this patch in you will now
> get abort for
> 
>   jboolean x = 1;
>   x++;
>   if (!x)
>     abort();

Out of interest, do we actually do this damn fool thing in libgcj somewhere?

Andrew.



More information about the Gcc-patches mailing list