------- Comment #4 from lindevel at gmx dot net 2006-09-03 20:08 ------- You proved ##c++ wrong! They bet that I would be ignored. ;)
The thing is that a void itself is not invalid. Using (expr ? void : void) works as you see in my report. In ##c++ I was told that ( x ? y : z ) wants both y and z to be of the same type. And that is stated in no way by the error message. And even if void would be invalid, the message doesn't tell me that. It just tells me "Hey I found a void.", but not that a void is invalid in a (?:). The connection to (?:) is not made. Instead it tells me something about a throw-expression. That might be a good message when you want to understand the internal code g++ uses to validate the expression, but for an end user it is not good. Perhaps we first should clear up what exactly the error is with that code. (I still don't know from the error message and you tell me something different than what I was told in ##c++. (Who also didn't know what that message could mean until someone said that the types don't match and g++ might be telling me how it found out.)) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28943