From 86bf2f51703c0a37cd7d34c788ca3eafbb7f4d9f Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Mon, 13 Nov 2023 18:09:49 -0800 Subject: [PATCH] CWG2823 Implicit undefined behavior when dereferencing pointers --- source/expressions.tex | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/expressions.tex b/source/expressions.tex index c5e0d59ae4..c5a58e7037 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -4561,7 +4561,9 @@ Its operand shall be a prvalue of type ``pointer to \tcode{T}'', where \tcode{T} is an object or function type. The operator yields an lvalue of type \tcode{T} -denoting the object or function to which the operand points. +If the operand points to an object or function, +the result denotes that object or function; +otherwise, the behavior is undefined except as specified in \ref{expr.typeid}. \begin{note} \indextext{type!incomplete}% Indirection through a pointer to an incomplete type (other than