There appears to be a simple typo in header valarray. Loction is Line 1012 in file libstdc++-v3/include/std/valarray in the current svn trunc in the third of three operators defined by the macro _DEFINE_BINARY_OPERATOR
I think this line should be changed from return _Expr<_Closure, _Tp>(_Closure(__t, __v)); \ to return _Expr<_Closure, _Rt>(_Closure(__t, __v)); \ similar to the corresponding lines in the two former operator definitions of that macro. A test program which does not compile currently, but does compile after the suggested change would be #include <valarray> std::valarray<bool> res(10); std::valarray<char> vc(10); char c; int main() { res = c == vc; } This mistake is also in gcc 4.1 and 4.2. I hope this helps. Regards Johannes Willkomm -- Summary: Small typo in valarray header Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: trivial Priority: P3 Component: libstdc++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: willkomm at sc dot rwth-aachen dot de GCC build triplet: any GCC host triplet: any GCC target triplet: any http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33084