public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
	"will_schmidt@vnet.ibm.com" <will_schmidt@vnet.ibm.com>,
	"cel@us.ibm.com" <cel@us.ibm.com>
Subject: Re: [PATCH] Add IEEE FLOAT128 support to test gdb.base/whatis-ptype-typedefs.exp
Date: Fri, 15 Jul 2022 11:42:16 +0000	[thread overview]
Message-ID: <a5a6fee8d5cc96f8d8e66e29d1dcec4b1bd7c0ec.camel@de.ibm.com> (raw)
In-Reply-To: <3fe4fcaf067f3bc3d4124df3ed6ba009a174f933.camel@us.ibm.com>

Carl Love <cel@us.ibm.com> wrote:

>+# Add the long double tests on the version of GCC
>+if { [test_compiler_info gcc-*] && [gcc_major_version] >= 12 } {
>+    lappend table {"long_double_typedef"    "long
double"           "_Float128"}
>+    lappend table
{"long_double_typedef2"   "long_double_typedef"   "_Float128"}
>+    lappend table
{"v_long_double_typedef"  "long_double_typedef"   "_Float128"}
>+    lappend table {"v_long_double_typedef2"
"long_double_typedef2"  "_Float128"}

This doesn't look correct to me.  First of all, we shouldn't
hardcode GCC version details like that (for one, this doesn't
account for any other compilers like LLVM or XLC).

But also, given that "long_double_typedef" is defined via:

typedef long double long_double_typedef;

in the source file, I think "ptype long_double_typedef"
should really always output "long double", no matter what
the underlying floating-point format is.  Seeing an output
of "_Float128" when that type is nowhere used in the
source code is weird.

So I think you should investigate a bit more why we're
seeing this particular output.

Bye,
Ulrich



  reply	other threads:[~2022-07-15 11:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-13 19:38 Carl Love
2022-07-15 11:42 ` Ulrich Weigand [this message]
2022-07-18 15:22 ` Pedro Alves
2022-07-18 15:40   ` Carl Love
2022-07-18 15:55     ` Carl Love

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a5a6fee8d5cc96f8d8e66e29d1dcec4b1bd7c0ec.camel@de.ibm.com \
    --to=ulrich.weigand@de.ibm.com \
    --cc=cel@us.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=will_schmidt@vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).