From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 128721 invoked by alias); 17 Dec 2019 19:53:40 -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 128288 invoked by uid 89); 17 Dec 2019 19:53:39 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-5.6 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy= 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, 17 Dec 2019 19:53:38 +0000 Received: from [172.16.0.95] (192-222-181-218.qc.cable.ebox.net [192.222.181.218]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id CA18B1E05A; Tue, 17 Dec 2019 14:53:36 -0500 (EST) Subject: Re: [PATCH] Fix indentation (and clang warning) in c-lang.c To: Pedro Alves , Simon Marchi , gdb-patches@sourceware.org References: <20191216233637.29925-1-simon.marchi@efficios.com> <6663a453-29d5-e38f-4f47-30c2ff18c331@simark.ca> From: Simon Marchi Message-ID: <09cd8258-3888-cf92-5f6b-3240f5e1658c@simark.ca> Date: Tue, 17 Dec 2019 19:53:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-12/txt/msg00755.txt.bz2 On 2019-12-17 2:41 p.m., Pedro Alves wrote: > On 12/17/19 7:39 PM, Simon Marchi wrote: >> On 2019-12-17 2:24 p.m., Pedro Alves wrote: >>> Curious. Are you saying that that changed recently in clang? I wonder >>> whether clang's warning catches this case on purpose, or whether it's >>> a regression. I asked David Malcolm, who added that warning to GCC, and he >>> said that GCC's implementation respects tab stops, so small numbers of >>> leading spaces before a tab are effectively ignored. >> >> The warning appears to be new in clang 10, because it doesn't exist in clang 9: >> >> $ clang++ test.cpp -Wmisleading-indentation >> warning: unknown warning option '-Wmisleading-indentation'; did you mean '-Wbinding-in-condition'? [-Wunknown-warning-option] >> >> I can't tell if it's on purpose or not. I wonder if it's worth opening a bug >> on clang's bugzilla to ask whether it's intentional or not, it might help them >> tweak the warning before it's officially released... > > Yes, I think it's worth it. Part of the point of using pre release compilers > is to catch&fix issues before they are released. Ok, I opened this: https://bugs.llvm.org/show_bug.cgi?id=44324 Simon