From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19416 invoked by alias); 14 Oct 2014 21:01:08 -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 19405 invoked by uid 89); 14 Oct 2014 21:01:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mail-pa0-f73.google.com Received: from mail-pa0-f73.google.com (HELO mail-pa0-f73.google.com) (209.85.220.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 14 Oct 2014 21:01:05 +0000 Received: by mail-pa0-f73.google.com with SMTP id et14so1585192pad.2 for ; Tue, 14 Oct 2014 14:01:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:mime-version:content-type :content-transfer-encoding:message-id:date:to:cc:subject:in-reply-to :references; bh=FearSXiospv5SXOBv6GkifDXHkW2oh2hNZDc6hThYiY=; b=RilELkrGOe9tr5JynF9ByNnzyxJeFf//c+EIL2K7qaZH2SGlwdwqZsqpmSxMGeinOe KXqP3HtniRFMsGiOhPWTqMPgSQhBGZSkW4V3q1MJrbkmjhzYJVitfO9KmxgwSgvxbJc/ vAXzKl7U2XhvktI8nimt/xlkroXdYqL+oErztFBAhZLXS+uFMarCQRLHfzOem3ocHtWq qZofw7aFjZp+TJPGu9h0hI7jY2P5MlSCM7AM52OGDLJ68XO96Dazu++KxtO+l0/Zd5rK OoQ+3z6ViZPZ4FLTPZrf9fdHaC/fpBkuve7+HaXX371+S8PuA2qSLBF4jSd6hhyOFSJe L/8A== X-Gm-Message-State: ALoCoQmKZPw45LakQkg2xMCywOjWoflhGf5oncbs9d3k2dOZT3ttLcfreianPGZaqD47kMG1iCimkjDt9FZniIscty8t0Woixv7vdYIxzaF6XcWJE+NTgbR5sbR9E/CLIBLq2NCUDle8zptFfedENS0MvShpYgEGrMe6LlE1tcGKHeL6Ads/yic= X-Received: by 10.66.230.137 with SMTP id sy9mr5179871pac.10.1413320464098; Tue, 14 Oct 2014 14:01:04 -0700 (PDT) Received: from corpmail-nozzle1-1.hot.corp.google.com ([100.108.1.104]) by gmr-mx.google.com with ESMTPS id n24si876174yha.6.2014.10.14.14.01.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Oct 2014 14:01:04 -0700 (PDT) Received: from ruffy2.mtv.corp.google.com ([172.17.128.107]) by corpmail-nozzle1-1.hot.corp.google.com with ESMTP id gBnYHWqj.1; Tue, 14 Oct 2014 14:01:03 -0700 From: Doug Evans MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <21565.36622.673293.934684@ruffy2.mtv.corp.google.com> Date: Tue, 14 Oct 2014 21:01:00 -0000 To: Siva Chandra Cc: gdb-patches Subject: Re: [PATCH 4/4] PR c++/13403 and PR c++/15154: Fix gnuv3_pass_by_reference to treat dynamic classes as non-trivial In-Reply-To: References: X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg00369.txt.bz2 Siva Chandra writes: > On Mon, Sep 29, 2014 at 1:08 AM, Doug Evans wrote: > >> 2014-09-11 Siva Chandra Reddy > >> > >> * gnu-v3-abi.c (gnuv3_pass_by_reference): Treat dynamic classes > >> as non-trivial. > > > > This looks ok to me. > > I couldn't find anything in the ABI to guide me (could certainly have > > missed it), though it seems reasonable and it does fix the testcase. > > The ABI defers the definition of triviality of copy constructors and > destructors to the C++ 98 final draft standard. The point under > question in this patch is under -6- here: > http://www.kouzdra.org/page/docs/isocpp/special.html#class.copy Ah. Thanks for the reference. LGTM with one nit. It'd be really nice to include a reference to the spec here. I don't know about others, but this stuff is not the kind of thing I tend to keep in cache, and when reading such code it's really nice to be able to find the relevant sections of the spec without any effort. Does the following make sense? + /* A dynamic class has a non-trivial copy constructor. + See c++98 section 12.8 Copying class objects [class.copy]. */ + if (gnuv3_dynamic_class (type)) + return 1; +