[patch] Leave errno unchanged by successful std::stoi etc

Jonathan Wakely jwakely@redhat.com
Thu Oct 1 11:24:00 GMT 2015


>commit 502928c8061343e82e982e06299c11d465f64b6c
>Author: Jonathan Wakely <jwakely@redhat.com>
>Date:   Wed Sep 30 14:10:58 2015 +0100
>
>    Save-and-restore errno more carefully in libstdc++
>    
>    	* doc/xml/manual/diagnostics.xml: Document use of errno.
>    	* config/locale/generic/c_locale.cc (_Save_errno): New helper.
>    	(__convert_to_v): Use _Save_errno.
>    	* include/ext/string_conversions.h (__stoa): Only restore errno when
>    	it isn't set to non-zero.
>
Committed to trunk.



More information about the Libstdc++ mailing list