From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id 5108B3858C62; Thu, 2 Mar 2023 15:15:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5108B3858C62 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1677770136; bh=ULKTMG78Ko9/lsvhZlzxv+sEXotbFCVHzxvIIVlh/3o=; h=From:To:Subject:Date:From; b=n9X68VOv9nCDkdXyLqjLd4HgDusBLAK8DuXz0LumVYo4tT+UnAHRmwrVi5MnREWHg SmBrIAZ7EkM/5Bq48RLJS8sJ6CYBnI+IpF5LLQQu6bUlEPQj4Cb2393IUGzToj/NQS UvK+b4ZnsaPiZ3qQYgbO7AJMRpv/2c/4j2AUhR1s= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom Tromey To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Fix some value comments X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: 78c7a5288e2ba8c9fd00ee948d1f20e4decb800c X-Git-Newrev: 2641391a87d5e6029cb1f083fd42926f668094eb Message-Id: <20230302151536.5108B3858C62@sourceware.org> Date: Thu, 2 Mar 2023 15:15:36 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D2641391a87d5= e6029cb1f083fd42926f668094eb commit 2641391a87d5e6029cb1f083fd42926f668094eb Author: Tom Tromey Date: Wed Mar 1 14:29:28 2023 -0700 Fix some value comments =20 I noticed a very stale comment in valarith.c. This patch fixes a few comments in this area. =20 Reviewed-By: Andrew Burgess Diff: --- gdb/valarith.c | 6 +++++- gdb/value.h | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gdb/valarith.c b/gdb/valarith.c index 6ea0cd9e8d1..4c2b44360bb 100644 --- a/gdb/valarith.c +++ b/gdb/valarith.c @@ -1884,7 +1884,7 @@ value_less (struct value *arg1, struct value *arg2) } } =0C -/* The unary operators +, - and ~. They free the argument ARG1. */ +/* See value.h. */ =20 struct value * value_pos (struct value *arg1) @@ -1902,6 +1902,8 @@ value_pos (struct value *arg1) error (_("Argument to positive operation not a number.")); } =20 +/* See value.h. */ + struct value * value_neg (struct value *arg1) { @@ -1948,6 +1950,8 @@ value_neg (struct value *arg1) error (_("Argument to negate operation not a number.")); } =20 +/* See value.h. */ + struct value * value_complement (struct value *arg1) { diff --git a/gdb/value.h b/gdb/value.h index c3eb96bf143..d83c4ab3674 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -1206,10 +1206,15 @@ extern struct value *value_ref (struct value *arg1,= enum type_code refcode); extern struct value *value_assign (struct value *toval, struct value *fromval); =20 +/* The unary + operation. */ extern struct value *value_pos (struct value *arg1); =20 +/* The unary - operation. */ extern struct value *value_neg (struct value *arg1); =20 +/* The unary ~ operation -- but note that it also implements the GCC + extension, where ~ of a complex number is the complex + conjugate. */ extern struct value *value_complement (struct value *arg1); =20 extern struct value *value_struct_elt (struct value **argp,