public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu>
To: egcs@cygnus.com
Subject: Is there a HOST_BITS_PER_POINTER macro?
Date: Thu, 05 Feb 1998 16:45:00 -0000	[thread overview]
Message-ID: <199802060045.TAA24627@caip.rutgers.edu> (raw)

If I have the following in gcc's src code:

  char * foo;
  [...]
  printf(HOST_PTR_PRINTF, foo);

I get a warning from "-W -Wall" which complains about int format vs
pointer argument.  Is there a way to define a macro in machmode.h
which can cast the pointer to the appropriately sized integer type?
I'd like to do the following 

  printf(HOST_PTR_PRINTF, (HOST_PTR_PRINTF_CAST) foo);

I think I need something that can be evaluated by cpp, not cc1.  So that
means I can't use sizeof.  If I could find a HOST_BITS_PER_PTR macro, I
could handle this in machmode.h.  But I can't find something like this
in the config files. 

		Thanks,
		--Kaveh
--
Kaveh R. Ghazi			Project Manager / Custom Development
ghazi@caip.rutgers.edu		ICon CMT Corp.

             reply	other threads:[~1998-02-05 16:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-02-05 16:45 Kaveh R. Ghazi [this message]
1998-02-05 22:09 ` Richard Henderson
1998-02-06  0:57   ` Jeffrey A Law
1998-02-05 22:09 ` Joern Rennecke
1998-02-06  8:48 Kaveh R. Ghazi
1998-02-10  3:34 ` Richard Henderson
1998-02-07 13:09 Kaveh R. Ghazi
1998-02-07 13:29 ` Richard Henderson

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=199802060045.TAA24627@caip.rutgers.edu \
    --to=ghazi@caip.rutgers.edu \
    --cc=egcs@cygnus.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).