[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] SLIRP warning messages displayed while compiling
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] SLIRP warning messages displayed while compiling |
Date: |
Sat, 12 Aug 2017 12:18:16 +0100 |
On 12 August 2017 at 12:04, Samuel Thibault <address@hidden> 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 size
> inside the packed structure. So there can't be alignment issues, and the
> compiler should be able to determine that.
Alignment is architecture-dependent, and the compiler
can't know the alignment requirements for every
architecture. There's no rule in C that says that
uint16_t only needs 2 byte alignment and not 4 on
some hosts.
(Also I just noticed 'struct ip6' uses bitfields:
that's badly non-portable if it's trying to
match an on-the-wire layout.)
thanks
-- PMM
- [Qemu-devel] SLIRP warning messages displayed while compiling, Programmingkid, 2017/08/10
- Re: [Qemu-devel] SLIRP warning messages displayed while compiling, Samuel Thibault, 2017/08/11
- Re: [Qemu-devel] SLIRP warning messages displayed while compiling, Peter Maydell, 2017/08/12
- Re: [Qemu-devel] SLIRP warning messages displayed while compiling, Samuel Thibault, 2017/08/12
- Re: [Qemu-devel] SLIRP warning messages displayed while compiling,
Peter Maydell <=
- Re: [Qemu-devel] SLIRP warning messages displayed while compiling, Samuel Thibault, 2017/08/12
- Re: [Qemu-devel] SLIRP warning messages displayed while compiling, Eric Blake, 2017/08/12
- Re: [Qemu-devel] SLIRP warning messages displayed while compiling, Samuel Thibault, 2017/08/12
- Re: [Qemu-devel] SLIRP warning messages displayed while compiling, Eric Blake, 2017/08/12
- Re: [Qemu-devel] SLIRP warning messages displayed while compiling, Philippe Mathieu-Daudé, 2017/08/12
- Re: [Qemu-devel] SLIRP warning messages displayed while compiling, Eric Blake, 2017/08/14