'void value not ignored as it ought to be' is a holdover from K&R C and is utterly incomprehensible to the modern C++ developer. Switch to 'invalid use of void expression' / 'cannot convert (%qE from) %<void%> to ' (already in use in cp/call.cc etc.) and add context/expected type information where available.
gcc is inconsistent in tense between "cannot" / "could not"; using "cannot" where it looks more consistent.
Omit misleading range labels where loc is unknown, e.g. in void() ? x : y
(o/w the caret points to y
, implying that gcc thinks that y
is void).
Pretty print the void_cst as void()
instead of (void)0
. This conforms to C++ e.g. in [dcl.type.auto.deduct], [temp.variadic].