From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 57086 invoked by alias); 18 Dec 2019 17:28:12 -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 57032 invoked by uid 89); 18 Dec 2019 17:28:12 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-10.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mail.efficios.com Received: from mail.efficios.com (HELO mail.efficios.com) (167.114.142.138) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 18 Dec 2019 17:28:10 +0000 Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id 238A168DEF0; Wed, 18 Dec 2019 12:28:09 -0500 (EST) Received: from mail.efficios.com ([IPv6:::1]) by localhost (mail02.efficios.com [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id XlOiCFSZ7wOn; Wed, 18 Dec 2019 12:28:08 -0500 (EST) Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id DBC0C68DEED; Wed, 18 Dec 2019 12:28:08 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com DBC0C68DEED DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=default; t=1576690088; bh=VKhmh0xYOsc2piH0xPjYQtpswzXDv0rpO69stv7H6Ww=; h=To:From:Message-ID:Date:MIME-Version; b=Gy0V55UuJuC38TqgJFkL4A6iU6/q7iB0agBKLlJj6BzpHJkAaLtiAHigMXiXnFPSc Ec372MNVm7W34MegAXMWj6WsB3/5zc3oo31QbmVGYmuZxQwRhJ+9zqRa/hiDcas9dT COUuWufAWb2nxQ+ACDKc3R01Y7bocOZwp4tkU3CL7f1upJp4l47Yqo6ohb/y4Uiqr+ yWrBd8npLlkztw6hYyqXWFWZCA2dxoDR8N6JCAS+AhYr7aN2Uw1RBweI2q+diSN8FS CKRyYJh+ZcSgK8QGjnQTwCGrcl4iMrCHfrPEq3YhCwzVBy/YqXNjGD3JrLXZiT2FRG 3c5ur6FQYgqxg== Received: from mail.efficios.com ([IPv6:::1]) by localhost (mail02.efficios.com [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id ZcEE-FonuTCd; Wed, 18 Dec 2019 12:28:08 -0500 (EST) Received: from [172.16.0.95] (192-222-181-218.qc.cable.ebox.net [192.222.181.218]) by mail.efficios.com (Postfix) with ESMTPSA id B14A168DEDB; Wed, 18 Dec 2019 12:28:08 -0500 (EST) Subject: Re: [PATCH] Fix -Wmisleading-indentation warning in top.c To: Pedro Alves , gdb-patches@sourceware.org References: <20191216235818.10307-1-simon.marchi@efficios.com> <86a9852f-eb6d-521f-7efc-0da48bc0ebee@redhat.com> From: Simon Marchi Message-ID: Date: Wed, 18 Dec 2019 17:28: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: <86a9852f-eb6d-521f-7efc-0da48bc0ebee@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-12/txt/msg00773.txt.bz2 On 2019-12-18 12:10 p.m., Pedro Alves wrote: > On 12/18/19 4:42 PM, Pedro Alves wrote: > >> Sounds like GCC should catch this too. > > It looks like it's the continuation line that prevents it. Here's > a minimal reproducer: > > void print (const char *); > > void function1 (void) > { > if (1) > print ("\n"); > print ("\n"); // warns > } > > void function2 (void) > { > if (1) > print ("hello\ > \n"); > print ("\n"); // does not warn > } > > I'll file a bug. > > Thanks, > Pedro Alves > Oh, thanks a lot for doing this, I should have done it in the first place... I pushed the patch. Simon