public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Pedro Alves <pedro@palves.net>, Gary Benson <gbenson@redhat.com>,
	gdb-patches@sourceware.org
Subject: Re: [PATCH] Skip tests requiring "alignof (void)" when compiling using clang
Date: Thu, 2 Jul 2020 16:52:45 -0400	[thread overview]
Message-ID: <8361fbe3-9843-95c1-6451-7a1a2aa0463e@simark.ca> (raw)
In-Reply-To: <d6a883c2-24dc-480a-8a23-f933b63dc166@palves.net>

On 2020-07-02 4:49 p.m., Pedro Alves wrote:
> I think this should still test GDB's support.  And a
> comment would be helpful.  Like:
> 
> # As an extension, GCC allows void pointer arithmetic, with
> # sizeof(void) and alignof(void) both 1.  GDB supports GCC's
> # extension.  Clang does not.
> if ![test_compiler_info clang*] {
>     set expected [get_integer_valueof a_void 0]
>     gdb_test "print alignof(void)" " = $expected"
> } else {
>     gdb_test "print alignof(void)" " = 1"
> }

Indeed.  Otherwise, let's say that clang gain this feature, it would remain untested
(when testing with clang) and nobody would think of coming here to update the test
case.  Here, if clang gains the feature, then I suppose it would generate a FAIL,
which would prompt us to update the test case.

Simon

  reply	other threads:[~2020-07-02 20:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-30 15:03 Gary Benson
2020-06-30 17:10 ` Luis Machado
2020-07-02 20:50   ` Pedro Alves
2020-07-02 20:49 ` Pedro Alves
2020-07-02 20:52   ` Simon Marchi [this message]
2020-07-02 21:08     ` Pedro Alves
2020-07-20 14:10   ` [PUSHED] " Gary Benson

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=8361fbe3-9843-95c1-6451-7a1a2aa0463e@simark.ca \
    --to=simark@simark.ca \
    --cc=gbenson@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@palves.net \
    /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).