From: Peter Maydell <peter.maydell@linaro.org>
To: Samuel Thibault <samuel.thibault@gnu.org>
Cc: Programmingkid <programmingkidx@gmail.com>,
Jan Kiszka <jan.kiszka@siemens.com>,
"qemu-devel@nongnu.org qemu-devel" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] SLIRP warning messages displayed while compiling
Date: Sat, 12 Aug 2017 12:18:16 +0100 [thread overview]
Message-ID: <CAFEAcA-N5pAM+3PXvjaJ-LMPFswAtmkAXA6yn151CCtfn+=JQA@mail.gmail.com> (raw)
In-Reply-To: <20170812110410.rosk6yhkj22w346s@var.youpi.perso.aquilenet.fr>
On 12 August 2017 at 12:04, Samuel Thibault <samuel.thibault@gnu.org> 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
next prev parent reply other threads:[~2017-08-12 11:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-10 20:44 [Qemu-devel] SLIRP warning messages displayed while compiling Programmingkid
2017-08-11 21:58 ` Samuel Thibault
2017-08-12 10:53 ` Peter Maydell
2017-08-12 11:04 ` Samuel Thibault
2017-08-12 11:18 ` Peter Maydell [this message]
2017-08-12 11:29 ` Samuel Thibault
2017-08-12 11:41 ` Eric Blake
2017-08-12 11:47 ` Samuel Thibault
2017-08-12 12:09 ` Eric Blake
2017-08-12 15:38 ` Philippe Mathieu-Daudé
2017-08-14 16:05 ` Eric Blake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAFEAcA-N5pAM+3PXvjaJ-LMPFswAtmkAXA6yn151CCtfn+=JQA@mail.gmail.com' \
--to=peter.maydell@linaro.org \
--cc=jan.kiszka@siemens.com \
--cc=programmingkidx@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=samuel.thibault@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).