This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Is there a HOST_BITS_PER_POINTER macro?
- To: egcs at cygnus dot com
- Subject: Is there a HOST_BITS_PER_POINTER macro?
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Thu, 5 Feb 1998 19:45:09 -0500 (EST)
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.