This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [patch] don't reset errno if no error occured
- From: Ulrich Drepper <drepper at redhat dot com>
- To: libstdc++ at gcc dot gnu dot org
- Date: Sat, 10 Jul 2010 07:34:47 -0700
- Subject: Re: [patch] don't reset errno if no error occured
- References: <4C38813E.1050308@ubuntu.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 07/10/2010 07:18 AM, Matthias Klose wrote:
> [reported at https://launchpad.net/bugs/598299]
This is just wrong. Nobody must look ever at errno unless the return
value of a function call says there has been an error. If this is not
the case errno can have any value. Any code not expecting this is broken.
- --
â Ulrich Drepper â Red Hat, Inc. â 444 Castro St â Mountain View, CA â
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
iEYEARECAAYFAkw4hQcACgkQ2ijCOnn/RHSv2gCfQkHK0h5zSLwlBLTXU2jBnQOT
cfgAn02y+kuwIvj03db84V7o3loNvsFE
=JyEa
-----END PGP SIGNATURE-----