From: Peter Korsgaard <peter@korsgaard.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] imx-usb-loader: fix build with older gcc
Date: Fri, 22 Jun 2018 12:22:51 +0200 [thread overview]
Message-ID: <877emrktms.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <ad92c4bc-c60a-6312-c484-0f7c447efa0a@mind.be> (Arnout Vandecappelle's message of "Thu, 21 Jun 2018 23:56:52 +0200")
>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:
Hi,
>> > ++#define BE16(x) (x<<8 | x>>8)
>>
>> I take it this is never called on anything where the double evaluation
>> causes any side effects?
> Even so, x without parenthesis around it is extremely dangerous...
> Since this is inside __GNUC__, we could just use an expression statement like
> in the kernel:
> #define BE16(x) \
> ({ \
> typeof(x) __x = (x); \
> (__x<<8 | __x>>8); \
> })
Correct. Baruch, will you send an update (here and upstream)?
--
Bye, Peter Korsgaard
prev parent reply other threads:[~2018-06-22 10:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-19 14:44 [Buildroot] [PATCH] imx-usb-loader: fix build with older gcc Baruch Siach
2018-06-19 20:52 ` Peter Korsgaard
2018-06-21 21:56 ` Arnout Vandecappelle
2018-06-22 10:22 ` Peter Korsgaard [this message]
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=877emrktms.fsf@dell.be.48ers.dk \
--to=peter@korsgaard.com \
--cc=buildroot@busybox.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.