qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for-3.1 2/2] disas/nanomips: Fix format strings


From: Stefan Weil
Subject: Re: [Qemu-devel] [PATCH for-3.1 2/2] disas/nanomips: Fix format strings
Date: Sun, 23 Dec 2018 21:30:15 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0

On 23.12.18 18:10, Aleksandar Markovic wrote:
> Hi, Stefan,
> 
> My plan is to accept this patch plus (in the same patch) following
> changes in nanomips.h:
> 
> This code:
> 
> typedef unsigned short uint16;
> typedef unsigned int uint32;
> typedef long long int64;
> typedef unsigned long long uint64;
> 
> namespace img
> {
>     typedef unsigned long long address;
> }
> 
> should become:
> 
> typedef uint16_t uint16;
> typedef uint32_t uint32;
> typedef int64_t int64;
> typedef uint64_t uint64;
> 
> namespace img
> {
>     typedef uint64_t address;
> }
> 
> The reason is that I would like to keep custom types. The custom types
> names "uint32", "int64", etc. are admittedly too generic, but that
> will change in further development, and it looks do not bother any
> compiler so far. This means that patch 1/1 will not be applied.


I must admit that I don't understand the reason for keeping the custom
types (many software projects work very well with the POSIX types), but
the more important thing is to get the right format strings, and your
approach will work for that.

It's also good that you address the definition of the "address" data
type. Maybe using "typedef uintptr_t address" could also be used
(reducing the memory use for 32 bit systems).

Stefan


> There is no need for respin, I will do the corrections while
> integrating pull request.
> 
> Please let me know if you object over this.
> 
> Thanks again for bringing all these issues!
> 
> Aleksandar



reply via email to

[Prev in Thread] Current Thread [Next in Thread]