https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77913
Bug ID: 77913 Summary: error building bits/locale_conv.h: expected primary-expression before ',' token Product: gcc Version: 6.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: doko at gcc dot gnu.org Target Milestone: --- [forwarded from https://bugs.debian.org/839995] The Debian issue has an unreduced test case, and a proposed fix. $ g++ -c MiniDriverContainerpreprocess.cpp In file included from /usr/include/c++/6/locale:43:0, from /usr/include/c++/6/iomanip:43, from Log.hpp:31, from MiniDriverContainer.hpp:33, from MiniDriverContainer.cpp:22: /usr/include/c++/6/bits/locale_conv.h: In member function 'std::__cxx11::wstring_convert<_Codecvt, _Elem, _Wide_alloc, _Byte_alloc>::wide_string std::__cxx11::wstring_convert<_Codecvt, _Elem, _Wide_alloc, _Byte_alloc>::from_bytes(const char*, const char*)': /usr/include/c++/6/bits/locale_conv.h:250:40: error: expected primary-expression before ',' token if (__str_codecvt_in(__first, __last, __out, *_M_cvt, _M_state, ^ /usr/include/c++/6/bits/locale_conv.h:252:4: error: return-statement with no value, in function returning 'std::__cxx11::wstring_convert<_Codecvt, _Elem, _Wide_alloc, _Byte_alloc>::wide_string' [-fpermissive] return __out; ^~~~~~ /usr/include/c++/6/bits/locale_conv.h: In member function 'std::__cxx11::wstring_convert<_Codecvt, _Elem, _Wide_alloc, _Byte_alloc>::byte_string std::__cxx11::wstring_convert<_Codecvt, _Elem, _Wide_alloc, _Byte_alloc>::to_bytes(const _Elem*, const _Elem*)': /usr/include/c++/6/bits/locale_conv.h:286:41: error: expected primary-expression before ',' token if (__str_codecvt_out(__first, __last, __out, *_M_cvt, _M_state, ^ /usr/include/c++/6/bits/locale_conv.h:288:4: error: return-statement with no value, in function returning 'std::__cxx11::wstring_convert<_Codecvt, _Elem, _Wide_alloc, _Byte_alloc>::byte_string' [-fpermissive] return __out; ^~~~~~ In file included from /usr/include/c++/6/locale:43:0, from /usr/include/c++/6/iomanip:43, from Log.hpp:31, from MiniDriverContainer.hpp:33, from MiniDriverContainer.cpp:22: /usr/include/c++/6/bits/locale_conv.h: In member function 'typename std::wbuffer_convert<_Codecvt, _Elem, _Tr>::_Wide_streambuf::int_type std::wbuffer_convert<_Codecvt, _Elem, _Tr>::overflow(typename std::wbuffer_convert<_Codecvt, _Elem, _Tr>::_Wide_streambuf::int_type)': /usr/include/c++/6/bits/locale_conv.h:382:29: error: expected primary-expression before ',' token else if (!_Tr::eq_int_type(__out, _Tr::eof())) ^