From: Richard Henderson <rth@redhat.com>
To: Kai Tietz <ktietz70@googlemail.com>
Cc: gdr@integrable-solutions.net, GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH]: Cast in c-pretty-print.c causes warning
Date: Wed, 02 Sep 2009 21:01:00 -0000 [thread overview]
Message-ID: <4A9EDD39.2010500@redhat.com> (raw)
In-Reply-To: <90baa01f0909021250y47d31cecv5fd2b5dd98a995db@mail.gmail.com>
On 09/02/2009 12:50 PM, Kai Tietz wrote:
> 2009/9/2 Gabriel Dos Reis<dosreis@gmail.com>:
>> On Mon, Aug 31, 2009 at 1:13 PM, Kai Tietz<ktietz70@googlemail.com> wrote:
>>> Hi,
>>>
>>> In general it is bad to use size_t to cast point to scalar, but here
>>> in c-pretty-print.c is looks ok, as the scalar is truncated to an
>>> unsigned int type here and just the lowest 16-bit are in fact used.
>>> So here the patch for it
>>
>> I'm not sure the 'size_t' trick makes the code clearer. In fact, I believe
>> we want uintptr_t -- but, in the form that OK with C90 compilers.
>>
> Right, by this reason we use in w64 not the gnu stdint.h header.
I think you've lost the plot. The gnu stdint.h header should
have the correct definition of uintptr_t even for w64. If not,
then that's what should be fixed.
> We
> define uintptr_t/intptr_t/size_t etc with __extension__ to avoid those
> warnings.
> I can introduce here an new type __extension__ typedef __SIZE_TYPE__
> c90_size_t;, if you prefer.
Huh?!? What exactly do you think __extension__ will accomplish?
r~
next prev parent reply other threads:[~2009-09-02 21:01 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-31 20:34 Kai Tietz
2009-09-02 19:03 ` Gabriel Dos Reis
2009-09-02 19:50 ` Kai Tietz
2009-09-02 21:01 ` Richard Henderson [this message]
2009-09-02 21:06 ` Kai Tietz
2009-09-02 21:18 ` Gabriel Dos Reis
2009-09-02 21:21 ` Kai Tietz
2009-09-02 22:17 ` Richard Henderson
2009-09-03 10:52 ` Richard Guenther
2009-09-03 13:30 ` Kai Tietz
2009-09-03 13:52 ` Richard Guenther
2009-09-03 14:09 ` Kai Tietz
2009-09-03 14:11 ` Richard Henderson
2009-09-03 14:19 ` Kai Tietz
2009-09-03 15:59 ` Kai Tietz
2009-09-04 2:12 ` Gabriel Dos Reis
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=4A9EDD39.2010500@redhat.com \
--to=rth@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=gdr@integrable-solutions.net \
--cc=ktietz70@googlemail.com \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).