Talk:Expression (computer science)
![]() | Perl (inactive) | |||
|
Void expressions
It is reported for the C language that a syntactically correct function call is an expression too unless the function has void return type.
This is incorrect (the citation is a 404 page anyway). In C, and I assume most C-derived languages, a syntactically-correct function call to a function with void return type is a valid expression. The expression has type "void" and evaluates to a valid value, "the void value", and there are special limitations on what you can do with a value of type "void" -- basically you can cast it to void, and just about everything else is disallowed. But it is a valid expression and a valid value. See ISO/IEC 9899:1999 section 6.3.2.2 (void). Hence I am changing the article. --EatMyShortz (talk) 11:47, 31 August 2009 (UTC)