MacArthur, Ian (SELEX GALILEO, UK) schrieb:
>> AFAIK, the behavior of both std::cout<< (char*)0
>> and printf("%s", NULL) are undefined by C++/C. As
>> always, an implementation can provide a definition
>> if it chooses to do so, which seems to have been
>> done for printf by the compiler(s) in question.
>
> Indeed so, I think that's right.
>
> Though in this case, Albrecht and I are both using versions of gcc, and
> the printf implementation seems to be rather more "robust" in this
> circumstance than the iostream version...
I don't think, software is more "robust", when it ignores problems
instead of reacting to a problem. Streaming or printing a NULL pointer
is not undefined, it's wrong. The system was told, to show a text and
there is no text, so it should tell about a problem, instead of doing
something or nothing.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk