From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20032 invoked by alias); 18 Dec 2019 17:10:59 -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 20016 invoked by uid 89); 18 Dec 2019 17:10:58 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Received:a7b X-HELO: us-smtp-1.mimecast.com Received: from us-smtp-delivery-1.mimecast.com (HELO us-smtp-1.mimecast.com) (207.211.31.120) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 18 Dec 2019 17:10:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576689055; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=u+ikpffetsme1t6Rzy5zRkh02OvnRXR243dYGMiJaUE=; b=JLaKwyT2Oy65Use/iwbtDqahvfZj4j4dfiqyoyVhkHXLMIvo8EDeuoB+9T1peYq3kbjarv AXkQegTgu30AC+emlrECpWuyXXB3+Wml4+3s8PSwY684ZFoqx7G4WMqflM6klF6e5Tz5k9 5YnbCmof/7Ho9N5lim1s7lbBn4+CKY0= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-409-x_5dSNGpMeC2BSf3hZMO-g-1; Wed, 18 Dec 2019 12:10:54 -0500 Received: by mail-wm1-f69.google.com with SMTP id 18so685709wmp.0 for ; Wed, 18 Dec 2019 09:10:54 -0800 (PST) Return-Path: Received: from ?IPv6:2001:8a0:f913:f700:56ee:75ff:fe8d:232b? ([2001:8a0:f913:f700:56ee:75ff:fe8d:232b]) by smtp.gmail.com with ESMTPSA id x16sm3137057wmk.35.2019.12.18.09.10.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 Dec 2019 09:10:52 -0800 (PST) Subject: Re: [PATCH] Fix -Wmisleading-indentation warning in top.c To: Simon Marchi , gdb-patches@sourceware.org References: <20191216235818.10307-1-simon.marchi@efficios.com> From: Pedro Alves Message-ID: <86a9852f-eb6d-521f-7efc-0da48bc0ebee@redhat.com> Date: Wed, 18 Dec 2019 17:10:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-12/txt/msg00771.txt.bz2 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