Fix compilation errors with libstdc++v3 for AVR target and allow --enable-libstdcxx

Jonathan Wakely jwakely@redhat.com
Tue Dec 6 18:11:00 GMT 2016


On 10/11/16 13:51 -0200, Felipe Magno de Almeida wrote:
>@@ -752,11 +770,13 @@ _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11
> 		  // Seconds. [tm_sec]
> 		  // [00, 60] in C99 (one leap-second), [00, 61] in C89.
> #if _GLIBCXX_USE_C99
>-		  __beg = _M_extract_num(__beg, __end, __tm->tm_sec, 0, 60, 2,
>+                  __mem = __tm->tm_sec;
>+		  __beg = _M_extract_num(__beg, __end, __mem, 0, 60, 2,
> #else
>-		  __beg = _M_extract_num(__beg, __end, __tm->tm_sec, 0, 61, 2,
>+		  __beg = _M_extract_num(__beg, __end, __mem, 0, 61, 2,
> #endif
> 					 __io, __tmperr);
>+                  __tm->tm_sec = __mem;
> 		  break;
> 		case 't':
> 		  if (__ctype.narrow(*__beg, 0) == '\t')

This part looks wrong too. The assignment to __mem should be outside
the #if condition.



More information about the Libstdc++ mailing list