[PATCH]: Add format attributes and fix exposed bugs

Andreas Schwab schwab@suse.de
Mon Jun 20 23:55:00 GMT 2005
Ian Lance Taylor <ian@airs.com> writes:

>> @@ -237,11 +237,11 @@ print_insn_ia64 (bfd_vma memaddr, struct
>>  	    if (str)
>>  	      (*info->fprintf_func) (info->stream, "%s", str);
>>  	    else if (odesc->flags & IA64_OPND_FLAG_DECIMAL_SIGNED)
>> -	      (*info->fprintf_func) (info->stream, "%lld", value);
>> +	      (*info->fprintf_func) (info->stream, "%lld", (long long) value);
>>  	    else if (odesc->flags & IA64_OPND_FLAG_DECIMAL_UNSIGNED)
>> -	      (*info->fprintf_func) (info->stream, "%llu", value);
>> +	      (*info->fprintf_func) (info->stream, "%llu", (long long) value);
>>  	    else
>> -	      (*info->fprintf_func) (info->stream, "0x%llx", value);
>> +	      (*info->fprintf_func) (info->stream, "0x%llx", (long long) value);
>>  	    break;
>>  
>>  	  case IA64_OPND_CLASS_REL:
>
> I'm not convinced that it is OK to use 'long long' here.  Maybe all
> ia64 compilers support long long, though.

This must be compilable on all hosts, not only ia64, but a 64bit type is
required when targeting ia64 and the use of %llx is already outside of
C90.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



More information about the Binutils mailing list