[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Triggers status?

Kurt Roeckx wrote:
I think you're talking about an implementations of stdargs here, not what
the standards says should happen.  Also, padding just means padding, not
zero or sign extending.

Yep, the standard does not mandate how it is to be implemented, but it DOES mandate that a literal 0 can be used as a null pointer, which requires that printf("%p", 0 ) work properly. That effectively requires the implementation to zero extend all arguments out to the same size. Either way, NULL is certainly supposed to work there according to the standard, so you shouldn't need (char *)0.

For that matter, why would you printf NULL directly anyhow? Usually you would be printing a pointer variable, which you may have assigned to NULL, making this va args discussion moot.

Nothing says that they should be extended, and I don't see why a compiler
would go and fill data in something it shouldn't.  On the other hand
the standard does say that a char and a short should be prompted to an

See above.

Reply to: