From: Jan Kiszka <jan.kiszka@web.de>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
qemu-devel <qemu-devel@nongnu.org>,
qemu-stable <qemu-stable@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] musicpal: Fix flash mapping
Date: Sat, 08 Sep 2012 10:50:40 +0200 [thread overview]
Message-ID: <504B06E0.6030100@web.de> (raw)
In-Reply-To: <CAAu8pHsAoTjb8-6qrhktJGJTaVRN7hg7pWyN-qHr2Na8rND0wQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1149 bytes --]
On 2012-09-08 10:44, Blue Swirl wrote:
> On Fri, Sep 7, 2012 at 3:25 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
>> On 7 September 2012 15:53, Jan Kiszka <jan.kiszka@web.de> wrote:
>>> On 2012-09-07 16:41, Peter Maydell wrote:
>>>> On 7 September 2012 00:03, Jan Kiszka <jan.kiszka@web.de> wrote:
>>>>> + pflash_cfi02_register(0x100000000-MP_FLASH_SIZE_MAX, NULL,
>>>>
>>>> I don't think this will compile on a 32 bit system, will it?
>>>> You probably want an ULL suffix.
>>>
>>> It does as the result always fits in 32 bits. But I can add that if you
>>> prefer.
>>
>> I think I had a misconception of this bit of the C standard.
>> C will pick a type big enough to fit the constant value (which
>> will in this case be a 64 bit type of some kind), even without
>> an ULL suffix. So you're right, it's OK.
>
> GCC disagrees:
> $ cat u64.c
> unsigned int i = 0x100000000 - 1;
> $ gcc -m32 -Wall -c u64.c
> u64.c:1: warning: integer constant is too large for 'long' type
Obviously depends on the compiler version or configuration, mine (4.5
still) does not. I'll send v2 to make them all happy.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]
next prev parent reply other threads:[~2012-09-08 8:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-06 23:03 [Qemu-devel] [PATCH] musicpal: Fix flash mapping Jan Kiszka
2012-09-07 14:41 ` Peter Maydell
2012-09-07 14:53 ` Jan Kiszka
2012-09-07 15:25 ` Peter Maydell
2012-09-08 8:44 ` Blue Swirl
2012-09-08 8:50 ` Jan Kiszka [this message]
2012-09-08 9:48 ` [Qemu-devel] [PATCH v2] " Jan Kiszka
2012-09-08 9:50 ` Peter Maydell
2012-09-08 9:51 ` Jan Kiszka
2012-09-08 9:52 ` [Qemu-devel] [PATCH v2a] " Jan Kiszka
2012-09-08 10:19 ` Blue Swirl
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=504B06E0.6030100@web.de \
--to=jan.kiszka@web.de \
--cc=blauwirbel@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.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).