------- Additional Comments From gdr at integrable-solutions dot net 2005-07-15 14:43 ------- Subject: Re: pointer +- integer is never NULL
"falk at debian dot org" <[EMAIL PROTECTED]> writes: | (In reply to comment #13) | > Subject: Re: pointer +- integer is never NULL | > | > "falk at debian dot org" <[EMAIL PROTECTED]> writes: | > | Sorry, I cannot follow you. I'd find it massively unsurprising if | > | reinterpret_cast<int*>(0) produces a null pointer, and if I then get | > | undefined behavior for doing something with it that is undefined for a | > | null pointer. | > | > But, if I used reinterpret_cast to turn an integer value 0 into a | > pointer, there is no reason why the compiler would assume that I do not | > know the underlying machine and what I'm doing with the pointer. | | The note merely requires the result of the mapping to be unsurprising; | it does not say anything about further operations of this result. Therefore, | it is completely irrelevant here. The "side" notes were written by people who know what they intend. Therefore their inputs are completely relevant here. -- Gaby -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22485