public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: "Joseph S. Myers" <jsm28@cam.ac.uk>
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org
Subject: Re: c/3112: printf error for structs with "long long" members
Date: Fri, 15 Jun 2001 02:36:00 -0000	[thread overview]
Message-ID: <20010615093601.11360.qmail@sourceware.cygnus.com> (raw)

The following reply was made to PR c/3112; it has been noted by GNATS.

From: "Joseph S. Myers" <jsm28@cam.ac.uk>
To: Yu Di <ydi@eecs.uic.edu>
Cc: <gcc-bugs@gcc.gnu.org>,  <gcc-gnats@gcc.gnu.org>,  <zwei@eecs.uic.edu>
Subject: Re: c/3112: printf error for structs with "long long" members
Date: Fri, 15 Jun 2001 10:31:23 +0100 (BST)

 On Thu, 14 Jun 2001, Yu Di wrote:
 
 > Hi, thanks for the reply, but I still have a question. I know "%lu" is not
 > the correct format for "long long" variables, and that member will not get
 > displayed correctly. But the question is: why the second struct member is
 > also not displayed correctly?
 
 As I said, read the Application Binary Interface (ABI) specification for 
 your system.  You may find that longs take up four bytes of stack space 
 and long longs eight bytes, so if printf takes a long where you put a long 
 long, it will locate subsequent arguments incorrectly as well.  Or there 
 may be some other calling convention with a similar effect.
 
 -- 
 Joseph S. Myers
 jsm28@cam.ac.uk
 


             reply	other threads:[~2001-06-15  2:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-15  2:36 Joseph S. Myers [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-06-11  4:11 jsm28
2001-06-10 17:26 ydi

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=20010615093601.11360.qmail@sourceware.cygnus.com \
    --to=jsm28@cam.ac.uk \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=nobody@gcc.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 read-only IMAP folder(s) and NNTP newsgroup(s).