It's consistent because the explicit definition of behavior is not
omitted. The standard defines the behavior of an ordinary function
call. I'm not going to take the time to look up the section(s) of the
standard that do so, but consider this. If a function returns a value
and the caller uses that value, the behavior is well defined (in the
absence of any other problems). If a function returns a value and the
caller doesn't use that value, the behavior is still well defined.
The act of not returning a value doesn't cause the behavior to become
undefined; there's no need to define the behavior of something the
program *doesn't* do. The only explicit statement of undefined
behavior is when the function doesn't return a value and the caller
attempts to use it. So if a function doesn't return a value and the
caller doesn't try to use the returned value, the behavior is already
covered by other clauses of the standard.
(This is necessary to maintain compatibility with pre-ANSI C. Before
the 1989 ANSI C standard, there was no void type. A function not
intended to return a value would be declared without an explicit
return type, which would default to int. The function would not
return a value, and the caller would not attempt to use the returned
value.)
--
Keith Thompson (The_Other_Keith) (e-mail address removed) <
http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"