From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 42325 invoked by alias); 6 Dec 2018 21:07:25 -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 42310 invoked by uid 89); 6 Dec 2018 21:07:25 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=andrews, Andrew's, andrew's, Andrews X-HELO: gateway33.websitewelcome.com Received: from gateway33.websitewelcome.com (HELO gateway33.websitewelcome.com) (192.185.145.239) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 06 Dec 2018 21:07:23 +0000 Received: from cm11.websitewelcome.com (cm11.websitewelcome.com [100.42.49.5]) by gateway33.websitewelcome.com (Postfix) with ESMTP id 72C534D309 for ; Thu, 6 Dec 2018 15:07:21 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id V0rhgSGrTRPojV0rhgZF77; Thu, 06 Dec 2018 15:07:21 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=PHYdfAW0xnkhiIp0Tczv9+GE9EU3FuSDZjbxHEWpHGM=; b=PJaRtkXU2EQL8885gXt20poRas I8Not7A/z+lehl1gJY8gY/uya9OiqD/5tS7tVN3dlB87nQcwp/RN7BFvNFkCs6FdhvwSEnbFc638J Xxo889IA6Z1hGSMlwMXex100G; Received: from [63.86.203.34] (port=48742 helo=pokyo) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1gV0rh-001v1k-5v; Thu, 06 Dec 2018 15:07:21 -0600 From: Tom Tromey To: Bob Steagall Cc: andrew.burgess@embecosm.com, gdb-patches@sourceware.org Subject: Re: potential patch for gdb bug c++/20020 References: <20181206192003.GZ18841@embecosm.com> Date: Thu, 06 Dec 2018 21:07:00 -0000 In-Reply-To: (Bob Steagall's message of "Thu, 6 Dec 2018 15:48:30 -0500") Message-ID: <87va46cqk7.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2018-12/txt/msg00079.txt.bz2 >>>>> "Bob" == Bob Steagall writes: >> You should drop the '{' and '}' here for a single statement block. Bob> Disagree. The gdb coding standard document specifically calls out Bob> lines of code, Bob> not statements: Bob> "Any two or more lines in code should be wrapped in braces, even if they Bob> are comments, as they look like separate statements" I think this is just slightly mis-worded -- Andrew's interpretation is the prevailing one. That is, no brace for: if (blah) function_call (spanning, multiple, lines); ... but do have braces for: if (blah) { /* Just a comment. */ anything (); } I agree the patch is good. I think a test case would be good to have, unless for some reason it's difficult to write one. Tom