On 08/12/2017 10:38 AM, Philippe Mathieu-Daudé wrote:
> Hi Eric,
>
> On 08/12/2017 08:41 AM, Eric Blake wrote:
>> Here's an idea: Instead of using struct ip6 { ... } QEMU_PACKED, use
>>
>> struct ip6 {
>> ...
>> };
>> QEMU_BUG_ON(sizeof(struct ip6) != 32);
>>
>> so that the compiler explicitly ch
Hi Eric,
On 08/12/2017 08:41 AM, Eric Blake wrote:
Here's an idea: Instead of using struct ip6 { ... } QEMU_PACKED, use
struct ip6 {
...
};
QEMU_BUG_ON(sizeof(struct ip6) != 32);
so that the compiler explicitly chokes if it introduced any padding, and
then we know all our accesses are natural
On 08/12/2017 06:47 AM, Samuel Thibault wrote:
> Eric Blake, on sam. 12 août 2017 06:41:30 -0500, wrote:
>> Here's an idea: Instead of using struct ip6 { ... } QEMU_PACKED, use
>>
>> struct ip6 {
>> ...
>> };
>> QEMU_BUG_ON(sizeof(struct ip6) != 32);
>
> That's an interesting way indeed. I howev
Eric Blake, on sam. 12 août 2017 06:41:30 -0500, wrote:
> Here's an idea: Instead of using struct ip6 { ... } QEMU_PACKED, use
>
> struct ip6 {
> ...
> };
> QEMU_BUG_ON(sizeof(struct ip6) != 32);
That's an interesting way indeed. I however wonder whether there may be
not-so-uncommon systems whe
On 08/12/2017 06:29 AM, Samuel Thibault wrote:
>>
>> Alignment is architecture-dependent, and the compiler
>> can't know the alignment requirements for every
>> architecture.
>
> Sure.
True, but we can at least guess alignments that don't require padding,
and then be told by the compiler if our g
Peter Maydell, on sam. 12 août 2017 12:18:16 +0100, wrote:
> On 12 August 2017 at 12:04, Samuel Thibault wrote:
> > Peter Maydell, on sam. 12 août 2017 11:53:20 +0100, wrote:
> >> The utility of the warning is that it means you get told
> >> about stuff that might break on other architectures.
> >
On 12 August 2017 at 12:04, Samuel Thibault wrote:
> Peter Maydell, on sam. 12 août 2017 11:53:20 +0100, wrote:
>> The utility of the warning is that it means you get told
>> about stuff that might break on other architectures.
>
> Sure, I understand that. But here all fields are aligned on their
Peter Maydell, on sam. 12 août 2017 11:53:20 +0100, wrote:
> The utility of the warning is that it means you get told
> about stuff that might break on other architectures.
Sure, I understand that. But here all fields are aligned on their size
inside the packed structure. So there can't be alignme
On 11 August 2017 at 22:58, Samuel Thibault wrote:
> Hello,
>
> Programmingkid, on jeu. 10 août 2017 16:44:19 -0400, wrote:
>> While compiling I saw these error messages:
>>
>> slirp/ip6_icmp.c:79:32: warning: taking address of packed member 'ip_src' of
>> class or
>> structure 'ip6' may re
Hello,
Programmingkid, on jeu. 10 août 2017 16:44:19 -0400, wrote:
> While compiling I saw these error messages:
>
> slirp/ip6_icmp.c:79:32: warning: taking address of packed member 'ip_src' of
> class or
> structure 'ip6' may result in an unaligned pointer value
> [-Waddress-of-pack
Host: Mac OS 10.12.5
Compiler: Apple LLVM version 8.1.0 (clang-802.0.42)
Command used: ./configure --target-list=ppc-softmmu,i386-softmmu && make -j 4
While compiling I saw these error messages:
slirp/ip6_icmp.c:79:32: warning: taking address of packed member 'ip_src' of
class or
structure
11 matches
Mail list logo