We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0456a32 commit 8b2c7fcCopy full SHA for 8b2c7fc
source/expressions.tex
@@ -5315,6 +5315,15 @@
5315
\grammarterm{expression} of a \grammarterm{noptr-new-declarator}), but
5316
\tcode{new float[5][n]} is ill-formed (because \tcode{n} is not a
5317
constant expression).
5318
+Furthermore,
5319
+\tcode{new float[0]} is well-formed
5320
+(because \tcode{0} is the \grammarterm{expression}
5321
+of a \grammarterm{noptr-new-declarator},
5322
+where a value of zero results in the allocation of an array with no elements),
5323
+but \tcode{new float[n][0]} is ill-formed
5324
+(because \tcode{0} is the \grammarterm{constant-expression}
5325
5326
+where only values greater than zero are allowed).
5327
\end{example}
5328
5329
\pnum
0 commit comments