Created on 2024-12-09.00:00:00 last changed 3 days ago
Proposed resolution:
This wording is relative to N5001.
Modify [support.types.nullptr] as indicated:
-2- The macro `NULL` is an implementation-defined null pointer constant that is a literal ([lex.icon], [lex.nullptr]).footnote 161
161) Possible definitions include `nullptr`, `0` and `0L`, but not `(void*)0`.
[ 2025-02-07; Jonathan provides improved wording ]
[ 2025-02-07; Reflector poll ]
Set priority to 3 after reflector poll.
"I'd very much like to see `nullptr` added to the footnote."
This wording is relative to N5001.
Modify [support.types.nullptr] as indicated:
-2- The macro `NULL` is an implementation-defined null pointer constant that is a literal ([lex.icon], [lex.nullptr]).footnote 161
161) Possible definitions include `0` and `0L`, but not `(void*)0`.
[conv.ptr]/1 reads in part: "A null pointer constant is an integer literal ([lex.icon]) with value zero or a prvalue of type `std::nullptr_t`.".
[support.types.nullptr]/2 reads: "The macro `NULL` is an implementation-defined null pointer constant.". Together, these imply that `#define NULL (::std::unreachable(), nullptr)` is a conforming definition. The expression is a prvalue of type `std::nullptr_t`, so it is a null pointer constant. This makes it implementation-defined whether any program that evaluates `NULL` has undefined behavior.History | |||
---|---|---|---|
Date | User | Action | Args |
2025-02-07 17:00:32 | admin | set | messages: + msg14588 |
2025-02-07 16:57:42 | admin | set | messages: + msg14585 |
2024-12-21 11:01:28 | admin | set | messages: + msg14523 |
2024-12-09 00:00:00 | admin | create |