Is there a HOST_BITS_PER_POINTER macro?
Kaveh R. Ghazi
ghazi@caip.rutgers.edu
Thu Feb 5 16:45:00 GMT 1998
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.
More information about the Gcc
mailing list