Request for review (M): 6778669: Patch from Red Hat -- fixes compilation errors

Andrew John Hughes gnu_andrew at member.fsf.org
Mon Feb 23 10:11:32 PST 2009


2009/2/22 David Holmes - Sun Microsystems <David.Holmes at sun.com>:
> Andrew,
>
> I think some of these need to be looked at more closely:
>
>  // Print out the dictionary contents as key-value pairs
> -static void dumpekey(const void* key)  { fprintf(stdout, "%s", key); }
> +static void dumpekey(const void* key)  { fprintf(stdout, "%p", key); }
>
> As far as I can see an ExprDict key is always a char*, hence %s is what we
> want not %p. So the right fix would be to cast key to char* .
>
> David Holmes
>
> Andrew John Hughes said the following on 02/23/09 06:35:
>>
>> 2009/2/22 Christian Thalinger <Christian.Thalinger at sun.com>:
>>>
>>> On Sun, 2009-02-22 at 12:18 -0800, Vladimir Kozlov wrote:
>>>>
>>>> Christian,
>>>>
>>>> Your changes looks good.
>>>> Could you also look on and possibly include fixes for hsdis build on
>>>> linux.
>>>
>>> Ahh, right!  There was an issue on Linux.  I will include the attached
>>> patches.
>>>
>>> Andrew tested the patch and there seem to be a ton of warnings... sigh.
>>> We try to fix them.
>>>
>>> -- Christian
>>>
>>>
>>
>> Even with this patch, there seem to be major issues in the ADLC parser
>> with GCC 4.3.3 on x86_64.  I assume IcedTea gets round them with the
>> patch to turn off -Werror.
>>
>> Attached is an extended version of twisti's patch which starts to fix
>> some of the issues in adlc.  I've also included the build log with
>> this applied.
>>
>

Yes, I wasn't suggesting a solution, just something to make it build :)
I thought it likely that it should be a char*, but, given the function
takes a void *, %p seemed the safest choice for the printf format
specifier.
-- 
Andrew :-)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

Support Free Java!
Contribute to GNU Classpath and the OpenJDK
http://www.gnu.org/software/classpath
http://openjdk.java.net

PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
Fingerprint: F8EF F1EA 401E 2E60 15FA  7927 142C 2591 94EF D9D8



More information about the hotspot-dev mailing list