This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Is there a HOST_BITS_PER_POINTER macro?


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]