This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] debug/tst-longjmp_chk2: Make signal handler more conservative [BZ #20248]
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Paul Eggert <eggert at cs dot ucla dot edu>
- Cc: Florian Weimer <fweimer at redhat dot com>, <libc-alpha at sourceware dot org>
- Date: Wed, 15 Jun 2016 22:10:27 +0000
- Subject: Re: [PATCH] debug/tst-longjmp_chk2: Make signal handler more conservative [BZ #20248]
- Authentication-results: sourceware.org; auth=none
- References: <20160613111111 dot 79B3D4022A42D at oldenburg dot str dot redhat dot com> <20160613140304 dot GT4053 at vapier dot lan> <e6a3257b-f9f6-a17f-5ec7-d8e5b9486237 at redhat dot com> <20160613184252 dot GV4053 at vapier dot lan> <c00dd1ed-6929-2ac6-1f51-6a927222bf2a at redhat dot com> <5761A0B4 dot 2050804 at cs dot ucla dot edu>
On Wed, 15 Jun 2016, Paul Eggert wrote:
> I never understood why GCC generated warnings for expressions cast to void, as
> that was the longstanding idiom for "I know this returns a value, and I don't
> want it."
The point is that longstanding idiom implies people seeing a warning and
blindly applying it, without thinking about whether there is a real bug
present or whether it's really an exceptional case where ignoring the
warning is OK. Unfortunately it's difficult to take technical measures
against stupidity, or to enforce a particular project's coding standards
for exceptions (like glibc's DIAG_*_NEEDS_COMMENT macros needing a comment
to explain why they are being used).
--
Joseph S. Myers
joseph@codesourcery.com