Mark McIntyre said:
Actually it [referring to 6.5.2.2 p10] does mean
unspecified behavior.
I'm unconvinced.
Hmmm. 6.5.2.2 p10 says
The order of evaluation of the function designator, the actual
arguments, and subexpressions within the actual arguments is
unspecified, but there is a sequence point before the actual
call.
Nothing else in 6.5.2.2 says anything using the word "unspecified".
Earlier, 3.4.4 p1-2, defining "unspecified behavior", says
3.4.4
unspecified behavior
behavior where this International Standard provides two or more
possibilities and imposes no further requirements on which is
chosen in any instance
EXAMPLE An example of unspecified behavior is the order in
which the arguments to a function are evaluated.
Those two together don't convince you that the word "unspecified" in
6.5.2.2 p10 is supposed to mean "unspecified behavior"? I'm at a loss
to see how a reasonable person could reach any other conclusion.
Annex J is informative and thus not gospel.
That's true, Annex J is informative rather than normative. But all
the evidence I'm aware of - 3.4.4, 6.5.2.2, J.1 - all support the
conclusion that use of the term "unspecified" is meant to be
synonymous with "unspecified behavior". Is there even a scintilla of
evidence that the word "unspecified" is ever used in the standard to
mean something other than "unspecified behavior"?
[repeated, rearranged for context]
I take the word "provides" to mean "provides" rather than
"allows". The two words are different and I suspect you're thinking of
"provides for".
No, I wasn't. The "provides for" phrasing is the intransitive use of
provides, and clearly the transitive is what's meant here. See for
example the online Merriam-Webster's dictionary, which gives AFFORDS
as one of the principal meanings for the transitive verb "provide".
Actually the sense that probably comes closest is "2 a : to supply or
make available"; the point I was trying to make is that the providing
is usually done implicitly rather than by explicit listing of possible
behaviors.
Euh, in that sentence, the word means "gives". Not "permits you to have".
No, it doesn't. Blankets don't *give* warmth (unless someone was talking
about electric blankets, which I wasn't). Blankets do *afford* warmth.
But this is a discussion for comp.std.c methinks.
Yes, it does seem like it's reached the point where it could
benefit from that audience.
Either way, the behaviour isn't specified by the standard....
Behavior that is "unspecified behavior" still isn't totally
unconstrained; the unspecified behavior that occurs must still be one
of the behaviors that the standard otherwise provides (ignoring for
the moment whether "provides" is meant in the sense of "explicitly
states" or "implicitly supplies"). So if, as I contend, this is a
case of unspecified behavior, that still doesn't mean any behavior is
possible - it must be a behavior that is provided by the standard.
If the meaning is not "unspecified behavior" but simply "unspecified"
(whatever that might mean), and there is no explicit definition of
behavior, then by section 4 p2, it is "undefined behavior". There is
no middle ground where the behavior is completely not specified yet
isn't undefined.