This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [patch] For BZ #17328, mark __errno_location with __attribute__((returns_nonnull)) for gcc >=4.9.0
- From: Rich Felker <dalias at libc dot org>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: Roland McGrath <roland at hack dot frob dot com>, Zack Weinberg <zackw at panix dot com>, Paul Pluzhnikov <ppluzhnikov at gmail dot com>, GLIBC Devel <libc-alpha at sourceware dot org>
- Date: Tue, 3 Mar 2015 00:13:48 -0500
- Subject: Re: [patch] For BZ #17328, mark __errno_location with __attribute__((returns_nonnull)) for gcc >=4.9.0
- Authentication-results: sourceware.org; auth=none
- References: <CALoOobOuAEpw+zxRrrDyHB7UVbAZMzreXqpujzZOWNLS7+aRUA at mail dot gmail dot com> <20150301011753 dot GV23507 at brightrain dot aerifal dot cx> <CAPC3xapQBMH+DJdup2Y8_tt6xdcFAnQLB_K8VpT3ouCavvzXXA at mail dot gmail dot com> <CAKCAbMgyAEueVsYB=avfUg0pK49YiY-Qyi8w1qXvfTCzfPbUiQ at mail dot gmail dot com> <20150302224606 dot 9C97F2C3A08 at topped-with-meat dot com> <alpine dot DEB dot 2 dot 10 dot 1503030341270 dot 17429 at digraph dot polyomino dot org dot uk>
On Tue, Mar 03, 2015 at 03:42:48AM +0000, Joseph Myers wrote:
> On Mon, 2 Mar 2015, Roland McGrath wrote:
>
> > Then a savvy user could '#undef errno' to use the TLS version. We could
>
> I don't think we should encourage users to #undef errno (something
> undefined in ISO C, and that wouldn't work with current glibc).
Agree. This is a really nasty idea. If such a feature is to be
exposed, it should be via a feature test macro, not UB hacks.
Rich