head 1.1; branch 1.1.1; access; symbols netbsd-11-0-RC4:1.1.1.2 netbsd-11-0-RC3:1.1.1.2 netbsd-11-0-RC2:1.1.1.2 netbsd-11-0-RC1:1.1.1.2 gcc-14-3-0:1.1.1.2 perseant-exfatfs-base-20250801:1.1.1.2 netbsd-11:1.1.1.2.0.14 netbsd-11-base:1.1.1.2 gcc-12-5-0:1.1.1.2 netbsd-10-1-RELEASE:1.1.1.2 perseant-exfatfs-base-20240630:1.1.1.2 gcc-12-4-0:1.1.1.2 perseant-exfatfs:1.1.1.2.0.12 perseant-exfatfs-base:1.1.1.2 netbsd-9-4-RELEASE:1.1.1.2 netbsd-10-0-RELEASE:1.1.1.2 netbsd-10-0-RC6:1.1.1.2 netbsd-10-0-RC5:1.1.1.2 netbsd-10-0-RC4:1.1.1.2 netbsd-10-0-RC3:1.1.1.2 netbsd-10-0-RC2:1.1.1.2 netbsd-10-0-RC1:1.1.1.2 gcc-12-3-0:1.1.1.2 gcc-10-5-0:1.1.1.2 netbsd-10:1.1.1.2.0.10 netbsd-10-base:1.1.1.2 netbsd-9-3-RELEASE:1.1.1.2 gcc-10-4-0:1.1.1.2 cjep_sun2x-base1:1.1.1.2 cjep_sun2x:1.1.1.2.0.8 cjep_sun2x-base:1.1.1.2 cjep_staticlib_x-base1:1.1.1.2 netbsd-9-2-RELEASE:1.1.1.2 cjep_staticlib_x:1.1.1.2.0.6 cjep_staticlib_x-base:1.1.1.2 gcc-10-3-0:1.1.1.2 netbsd-9-1-RELEASE:1.1.1.2 gcc-9-3-0:1.1.1.2 gcc-7-5-0:1.1.1.2 phil-wifi-20200421:1.1.1.2 phil-wifi-20200411:1.1.1.2 is-mlppp:1.1.1.2.0.4 is-mlppp-base:1.1.1.2 phil-wifi-20200406:1.1.1.2 gcc-8-4-0:1.1.1.2 netbsd-9-0-RELEASE:1.1.1.2 netbsd-9-0-RC2:1.1.1.2 netbsd-9-0-RC1:1.1.1.2 phil-wifi-20191119:1.1.1.2 gcc-8-3-0:1.1.1.2 netbsd-9:1.1.1.2.0.2 netbsd-9-base:1.1.1.2 phil-wifi-20190609:1.1.1.2 pgoyette-compat-merge-20190127:1.1.1.1.2.1 pgoyette-compat-20190127:1.1.1.2 gcc-7-4-0:1.1.1.2 pgoyette-compat-20190118:1.1.1.2 pgoyette-compat-1226:1.1.1.2 pgoyette-compat-1126:1.1.1.2 gcc-6-5-0:1.1.1.2 pgoyette-compat-1020:1.1.1.1 pgoyette-compat-0930:1.1.1.1 pgoyette-compat-0906:1.1.1.1 pgoyette-compat-0728:1.1.1.1 phil-wifi:1.1.1.1.0.4 phil-wifi-base:1.1.1.1 pgoyette-compat-0625:1.1.1.1 pgoyette-compat-0521:1.1.1.1 pgoyette-compat-0502:1.1.1.1 pgoyette-compat-0422:1.1.1.1 pgoyette-compat-0415:1.1.1.1 pgoyette-compat-0407:1.1.1.1 pgoyette-compat-0330:1.1.1.1 pgoyette-compat-0322:1.1.1.1 pgoyette-compat-0315:1.1.1.1 pgoyette-compat:1.1.1.1.0.2 pgoyette-compat-base:1.1.1.1 gcc-6-4-0:1.1.1.1 FSF:1.1.1; locks; strict; comment @# @; 1.1 date 2018.02.02.01.59.02; author mrg; state Exp; branches 1.1.1.1; next ; commitid XNKaycqpfhzd5epA; 1.1.1.1 date 2018.02.02.01.59.02; author mrg; state Exp; branches 1.1.1.1.2.1 1.1.1.1.4.1; next 1.1.1.2; commitid XNKaycqpfhzd5epA; 1.1.1.2 date 2018.11.04.00.12.37; author mrg; state Exp; branches; next ; commitid bulspy67pMB6EyYA; 1.1.1.1.2.1 date 2018.11.26.01.50.57; author pgoyette; state Exp; branches; next ; commitid Zj4q5SspGdKXto1B; 1.1.1.1.4.1 date 2019.06.10.21.54.48; author christos; state Exp; branches; next ; commitid jtc8rnCzWiEEHGqB; desc @@ 1.1 log @Initial revision @ text @ Use of errno by the library

Use of errno by the library

The C and POSIX standards guarantee that errno is never set to zero by any library function. The C++ standard has less to say about when errno is or isn't set, but libstdc++ follows the same rule and never sets it to zero.

On the other hand, there are few guarantees about when the C++ library sets errno on error, beyond what is specified for functions that come from the C library. For example, when std::stoi throws an exception of type std::out_of_range, errno may or may not have been set to ERANGE.

Parts of the C++ library may be implemented in terms of C library functions, which may result in errno being set with no explicit call to a C function. For example, on a target where operator new uses malloc a failed memory allocation with operator new might set errno to ENOMEM. Which C++ library functions can set errno in this way is unspecified because it may vary between platforms and between releases.

@ 1.1.1.1 log @import GCC 6.4.0. see this url for details which are too large to include here: http://gcc.gnu.org/gcc-6/changes.html the main visible changes appear to be: - The default mode for C++ is now -std=gnu++14 instead of -std=gnu++98. - The C and C++ compilers now support attributes on enumerators. - Diagnostics can now contain "fix-it hints" - more warnings (some added to -Wall) @ text @@ 1.1.1.1.4.1 log @Sync with HEAD @ text @d2 1 a2 1 Use of errno by the library