Created on 2006-05-24.00:00:00 last changed 131 months ago
[Moved to DR status at the April, 2013 meeting as paper N3624.]
Proposed resolution (April, 2013):
This issue is resolved by the resolution of issue 1512.
In C, this is ill-formed (cf C99 6.5.8):
void f(char* s) { if (s < 0) { } }
...but in C++, it's not. Why? Who would ever need to write (s > 0) when they could just as well write (s != 0)?
This has been in the language since the ARM (and possibly earlier); apparently it's because the pointer conversions (7.3.12 [conv.ptr]) need to be performed on both operands whenever one of the operands is of pointer type. So it looks like the "null-ptr-to-real-pointer-type" conversion is hitching a ride with the other pointer conversions.
History | |||
---|---|---|---|
Date | User | Action | Args |
2014-03-03 00:00:00 | admin | set | status: drwp -> cd3 |
2013-10-14 00:00:00 | admin | set | status: dr -> drwp |
2013-09-03 00:00:00 | admin | set | messages: + msg4561 |
2013-09-03 00:00:00 | admin | set | messages: + msg4560 |
2013-09-03 00:00:00 | admin | set | status: open -> dr |
2006-05-24 00:00:00 | admin | create |