Does any one see how to have a type in a va_arg that can accept int(32 bit) or pointers(64bit) in a 64 bit environment.

This page suggests that VC++ will support %I in the future. I was wondering if there is any way to do this portably.
http://msdn.microsoft.com/library/en...iderations.asp

For example:

We have INT_PTR ip = va_arg(marker, void *);

The problem is that when you have something like this:

printf("%I", 100);

The va_arg will read in 64bits(sizeof(void *)) when only 32 bits(sizeof(int)) have been supplied.

I suspect this is impossible. Anyone have any ideas.

PS. Is it possible that default type promotions will promote everything to 64bit despite sizeof(int) and sizeof(long) being 32 bit.

Thanks.