From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28768 invoked by alias); 4 Nov 2014 14:59:07 -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 28758 invoked by uid 89); 4 Nov 2014 14:59:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: e06smtp16.uk.ibm.com Received: from e06smtp16.uk.ibm.com (HELO e06smtp16.uk.ibm.com) (195.75.94.112) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 04 Nov 2014 14:59:06 +0000 Received: from /spool/local by e06smtp16.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 4 Nov 2014 14:59:02 -0000 Received: from d06dlp02.portsmouth.uk.ibm.com (9.149.20.14) by e06smtp16.uk.ibm.com (192.168.101.146) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 4 Nov 2014 14:59:01 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 797282190046 for ; Tue, 4 Nov 2014 14:58:35 +0000 (GMT) Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id sA4Ex0JK16253320 for ; Tue, 4 Nov 2014 14:59:00 GMT Received: from d06av02.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id sA4EwxcK001549 for ; Tue, 4 Nov 2014 07:59:00 -0700 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with SMTP id sA4EwuJT001432; Tue, 4 Nov 2014 07:58:56 -0700 Message-Id: <201411041458.sA4EwuJT001432@d06av02.portsmouth.uk.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Tue, 04 Nov 2014 15:58:56 +0100 Subject: Re: [PATCH v4] Make chained function calls in expressions work To: sivachandra@google.com (Siva Chandra) Date: Tue, 04 Nov 2014 14:59:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org (gdb-patches) In-Reply-To: from "Siva Chandra" at Nov 04, 2014 06:26:21 AM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14110414-0025-0000-0000-0000023D0D9C X-SW-Source: 2014-11/txt/msg00063.txt.bz2 Siva Chandra wrote: > On Tue, Nov 4, 2014 at 5:38 AM, Ulrich Weigand wrote: > > Yes, having an additional flag in struct expression would fix the safety > > issue. Moving initialization to evalute_subexp if *pos == 0 would then > > no longer be safety issue, but simply enabling use of temporaries in more > > cases. > > Since I have my code already setup in this fashion, I would prefer to > go this route unless you see an advantage of going with the solution > you suggest below. Well, I don't think there are any functional advantages as such, but the implementation looks a bit cleaner (all the details of temporary handling done in infcall.c; fewer interactions between eval.c and infcall.c; shorter patch overall). > > You mean "Any two or more lines in code should be wrapped in braces, even > > if they are comments, as they look like separate statements"? I don't think > > this is intended to apply to cases like the above where a single statement > > just had to split into multiple lines since it doesn't fit into one. > > This case will never "look like separate statements". In any case, all > > the existing precedent in GDB does not have extra braces in that case. > > Sorry for picking this. I point out because I was asked to put braces > for cases like this in the past. Example: > extension.c:get_xmethod_arg_types. I wouldn't have required the braces there either :-) But in any case, I don't really care very much; I'd be happy to approve the patch with or without braces in this place ... Bye, Ulrich -- Dr. Ulrich Weigand GNU/Linux compilers and toolchain Ulrich.Weigand@de.ibm.com