From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19917 invoked by alias); 20 Aug 2015 05:35:42 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 19850 invoked by uid 55); 20 Aug 2015 05:35:38 -0000 From: "rusty at rustcorp dot com.au" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/66425] (void) cast doesn't suppress __attribute__((warn_unused_result)) Date: Thu, 20 Aug 2015 05:35:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 4.9.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: rusty at rustcorp dot com.au X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-08/txt/msg01381.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425 --- Comment #21 from rusty at rustcorp dot com.au --- jengelh at inai dot de writes: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425 > > --- Comment #20 from Jan Engelhardt --- > Seems like the short route is to add a new attribute > ((warn_unused_result_with_void_cancelling)) that exhibits the "desired" > behavior of (void) cancelling the warning, and then make glibc use that. > Simple, no? Indeed! I'll produce the patch if anyone thinks it's worthwhile? It'll only take another 10 years to switch everyone :) Thanks, Rusty.