From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gateway21.websitewelcome.com (gateway21.websitewelcome.com [192.185.46.113]) by sourceware.org (Postfix) with ESMTPS id 21BA9394880F for ; Fri, 20 Mar 2020 21:53:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 21BA9394880F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=tom@tromey.com Received: from cm16.websitewelcome.com (cm16.websitewelcome.com [100.42.49.19]) by gateway21.websitewelcome.com (Postfix) with ESMTP id C8150400CB724 for ; Fri, 20 Mar 2020 16:53:43 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id FPaJjyP6L8vkBFPaJjpFhi; Fri, 20 Mar 2020 16:53:43 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type: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=WRJqjV+OnGw5ZjQ8z8c5SXih3TTuxZ06uNZlqIiU/Nk=; b=AnhSQ6y0IsWwOb81qgaNVQhQ6H KEBFmJNZDTpdWxW4ideP7rNYV6/x+u7LEqBwopjQa4Q85kioh+lOICgQnrRJhHmg/x3gmGeHm/mTr McPvhF5quaJwCTnUih0Xw42nk; Received: from 97-118-117-21.hlrn.qwest.net ([97.118.117.21]:35792 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1jFPaJ-003c6k-Jo; Fri, 20 Mar 2020 15:53:43 -0600 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH v2 7/7] Fix value_literal_complex comment Date: Fri, 20 Mar 2020 15:53:40 -0600 Message-Id: <20200320215340.16749-8-tom@tromey.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200320215340.16749-1-tom@tromey.com> References: <20200320215340.16749-1-tom@tromey.com> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.118.117.21 X-Source-L: No X-Exim-ID: 1jFPaJ-003c6k-Jo X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-118-117-21.hlrn.qwest.net (bapiya.Home) [97.118.117.21]:35792 X-Source-Auth: tom+tromey.com X-Email-Count: 9 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-19.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, JMQ_SPF_NEUTRAL, RCVD_IN_ABUSEAT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_BL, RCVD_IN_MSPIKE_L3, RCVD_IN_SBL_CSS, SPF_HELO_PASS, SPF_NEUTRAL, URIBL_CSS, URIBL_CSS_A autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Mar 2020 21:53:45 -0000 Christian pointed out that the value_literal_complex was still a bit weird; this patch rewrites it and moves it to value.h. gdb/ChangeLog 2020-03-20 Tom Tromey * value.h (value_literal_complex): Add comment. * valops.c (value_literal_complex): Refer to value.h. --- gdb/ChangeLog | 5 +++++ gdb/valops.c | 6 ++---- gdb/value.h | 4 ++++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/gdb/valops.c b/gdb/valops.c index 83fd2584b59..03c6482ee1e 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -3854,12 +3854,10 @@ value_slice (struct value *array, int lowbound, int length) return slice; } -/* Create a value for a FORTRAN complex number. Currently most of the - time values are coerced to COMPLEX*16 (i.e. a complex number - composed of 2 doubles. */ +/* See value.h. */ struct value * -value_literal_complex (struct value *arg1, +value_literal_complex (struct value *arg1, struct value *arg2, struct type *type) { diff --git a/gdb/value.h b/gdb/value.h index 85fe6c297f5..247be13a0d9 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -1138,6 +1138,10 @@ extern struct value *varying_to_slice (struct value *); extern struct value *value_slice (struct value *, int, int); +/* Create a complex number. The type is the complex type; the values + are cast to the underlying scalar type before the complex number is + created. */ + extern struct value *value_literal_complex (struct value *, struct value *, struct type *); -- 2.17.2