From: Roland Schwingel <roland@onevision.com>
To: insight@sourceware.org, Patrick.Monnerat@datasphere.ch
Subject: Re: [PATCH] print format does not match argument type
Date: Tue, 10 Apr 2012 14:30:00 -0000 [thread overview]
Message-ID: <4F8443D1.9080105@onevision.com> (raw)
Hi Patrick,
insight-owner@sourceware.org wrote on 05.04.2012 18:34:27:
> In gdb/gdbtk/generic/gdbtk-register.c, 2 statements try to use a print
> format of "%lx" for a size_t argument. The correctness of such
> statements is architecture dependent. If warnings are treated as
> errors,the compilation fails.
Which warnings do you get on which platform?
The casts to size_t where introduced by myself some days ago.
Previously they where casted to long.
The TYPE_FIELD_TYPE macro returns a pointer to a struct type.
Treating this as (unsigned) long is pretty correct on *nix style
systems but not on windows. On 64bit windows a long is still 4 bytes
long, so the downcasted value is simply wrong.
Roland
next reply other threads:[~2012-04-10 14:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-10 14:30 Roland Schwingel [this message]
2012-04-10 15:10 ` Patrick Monnerat
2012-04-10 16:08 ` Patrick Monnerat
2012-04-10 16:28 ` Keith Seitz
2012-04-13 14:52 ` Pierre Muller
2012-04-13 15:18 ` Keith Seitz
2012-04-13 15:25 ` Pierre Muller
-- strict thread matches above, loose matches on Subject: below --
2012-04-11 11:38 Roland Schwingel
2012-04-11 17:24 ` Patrick Monnerat
2012-04-10 16:59 Roland Schwingel
2012-04-05 16:34 Patrick Monnerat
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=4F8443D1.9080105@onevision.com \
--to=roland@onevision.com \
--cc=Patrick.Monnerat@datasphere.ch \
--cc=insight@sourceware.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 read-only IMAP folder(s) and NNTP newsgroup(s).