From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: attribute warn_unused_result Date: Fri, 04 Feb 2011 16:14:03 -0500 Message-ID: References: <83r5bobz2k.fsf@gnu.org> <4D4B4EEA.50907@cs.ucla.edu> <83hbckb3u4.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1296854059 31618 80.91.229.12 (4 Feb 2011 21:14:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 4 Feb 2011 21:14:19 +0000 (UTC) Cc: Paul Eggert , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 04 22:14:14 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PlSyr-0007u1-Pn for ged-emacs-devel@m.gmane.org; Fri, 04 Feb 2011 22:14:13 +0100 Original-Received: from localhost ([127.0.0.1]:54297 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PlSyr-000211-1e for ged-emacs-devel@m.gmane.org; Fri, 04 Feb 2011 16:14:13 -0500 Original-Received: from [140.186.70.92] (port=59498 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PlSyl-0001yK-6L for emacs-devel@gnu.org; Fri, 04 Feb 2011 16:14:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PlSyk-0007ri-7N for emacs-devel@gnu.org; Fri, 04 Feb 2011 16:14:07 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183]:18011 helo=ironport2-out.pppoe.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PlSyi-0007rT-CI; Fri, 04 Feb 2011 16:14:04 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAOb6S01MCqAf/2dsb2JhbAClLHS5ToVaBIR6jDCCbQ X-IronPort-AV: E=Sophos;i="4.60,428,1291611600"; d="scan'208";a="90619532" Original-Received: from 76-10-160-31.dsl.teksavvy.com (HELO ceviche.home) ([76.10.160.31]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 04 Feb 2011 16:14:03 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id B43FB660DC; Fri, 4 Feb 2011 16:14:03 -0500 (EST) In-Reply-To: <83hbckb3u4.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 04 Feb 2011 10:29:07 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.183 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:135592 Archived-At: > impossible to tell the compiler not to emit this warning by the > "usual" C technique of using a cast. Looks like a bug in gcc. I'd be surprised if they accept this qualification, but really what's the point of emitting a warning when the user explicitly put a cast to void? > Btw, isn't it ironic that gnulib, a GNU project, and all other GNU > projects that use gnulib, need to jump through the hoops to work > around misfeatures in glibc, one of the most important and core GNU > projects? I don't see how/why you'd consider it a misfeature of glibc. The warning comes from gcc, AFAICT, and is generally a good one, it's just that gcc should understand the standard way in C to say that you want to discard a value. Stefan