From: Johan K. <joh...@id...> - 2001-06-03 16:21:34
|
> >Michael's bug report pointed me (again) at the printf and stdarg issue. > >It's still (again?) a mess. > Still :-( The compiler crash is one of the first bugs I reported. Yes, I remember, in fact it is still in my "todo-box": jk>>You are right. The precompiler changes "p = va_arg( argptr, char * );" to jk>>"*((char * _data * )(argptr -= sizeof(char *)))", which is nonsense. jk> bh>Hmm. I can´t see why it should be nonsense. I think it´s ok. But this does not mean too much :-) > I stripped it down to: ... > Or even shorter: ... > Or even shorter: char *nonsense( void ) { return *(char * _data *)0; } I think this means that the literal "0" is casted to a generic pointer in data space, whose content is returned. I don't know whether the address in data space or the generic point should be "0" in this case. Neither does the compiler it seems because it crashes. When making this case less ambigious with "return *(char _generic * _data *)0", the compiler returns the generic pointer located in data space @0. This has the same effect as in MH's bug report. I couldn't find the solution and won't look any further. Sorry. Johan |