From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 60012 invoked by alias); 13 Jun 2017 20:17:16 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 59989 invoked by uid 89); 13 Jun 2017 20:17:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=nonetheless, act X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 13 Jun 2017 20:17:12 +0000 Received: by simark.ca (Postfix, from userid 33) id 5F56F1E5A4; Tue, 13 Jun 2017 16:17:15 -0400 (EDT) To: Eli Zaretskii Subject: Re: [PATCH 0/5] Remove a few hurdles of compiling with clang X-PHP-Originating-Script: 33:rcube.php MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 13 Jun 2017 20:17:00 -0000 From: Simon Marchi Cc: qiyaoltc@gmail.com, gdb-patches@sourceware.org In-Reply-To: <83a85b4rrs.fsf@gnu.org> References: <1497124689-11842-1-git-send-email-simon.marchi@ericsson.com> <83tw3n5jyk.fsf@gnu.org> <86tw3labb0.fsf@gmail.com> <83a85d5l4n.fsf@gnu.org> <93eb64489ac9d53665a144ddf5a966d5@polymtl.ca> <83wp8h40lo.fsf@gnu.org> <8660g0dzau.fsf@gmail.com> <83k24g3qcx.fsf@gnu.org> <83a85b4rrs.fsf@gnu.org> Message-ID: <5c75dd67a82d99cfe0befdfe777abcc9@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.2.5 X-IsSubscribed: yes X-SW-Source: 2017-06/txt/msg00405.txt.bz2 On 2017-06-13 21:22, Eli Zaretskii wrote: > See, I don't consider the proposed solution to be elegant, because it > tweaks a perfectly valid code to placate a stupid compiler warning. It replaces perfectly valid code with some other perfectly valid code. That the compiler warning is stupid is your opinion. I think it's useful (even though it may trigger false positives sometimes). > Someone at some point might rightfully ask why didn't we use > ALL_DEBUG_ADDRESS_REGISTERS instead, and might even reinstate the code > you are about to change. So I prefer to have a seemingly "ugly" > workaround, which nonetheless points out exactly which warning of what > compiler caused it. That way, at some future point, when clang > hopefully gets its act together, we could revisit the issue and see > that the workaround is no longer needed. We can always add comments like /* Don't use ALL_DEBUG_ADDRESS_REGISTERS here to silence Clang's -Wfor-loop-analysis warning. */ like we have right now for GCC warnings: breakpoint.c:14747: /* Initialize it just to avoid a GCC false warning. */ Even though I have a slight preference for not silencing warnings when possible, it's really not a strong opinion, I would also be fine with the #pragma if that's what people prefer. Simon