From: Pedro Alves <palves@redhat.com>
To: Philipp Rudo <prudo@linux.vnet.ibm.com>,
Simon Marchi <simon.marchi@ericsson.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v2] Class-ify ptid_t
Date: Fri, 07 Apr 2017 10:48:00 -0000 [thread overview]
Message-ID: <5adec1b9-2faf-d8af-0116-c237ee591738@redhat.com> (raw)
In-Reply-To: <20170407112528.3f03fd37@ThinkPad>
On 04/07/2017 10:25 AM, Philipp Rudo wrote:
> In this context I ask myself what the error message is supposed to
> say (unfortunately you are the first one in GDB actually using it, all
> others only use an empty string). Is it what's expected ...
>
That's because the static assertion failure text includes both a
file:line indicating where's the failure, and modern gcc/clang
show you the line that failed, so it's not that big of a deal to
not include a message:
src/gdb/thread.c:1589:1: error: static assertion failed:
static_assert (1 == 0, "");
^
$
(and in C++17, static_assert got an overload with no second
parameter, even.)
>
> static_assert (pid == ptid_t (1, 0, 0), "pid operator== returned false")
>
>
> I tend more to what is expected.
Definitely it should say what is expected, just like regular
testsuite tests. Or say nothing when the expression is pretty clear
already, which works for me too. :-)
Thanks,
Pedro Alves
next prev parent reply other threads:[~2017-04-07 10:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-06 19:03 Simon Marchi
2017-04-06 22:23 ` Pedro Alves
2017-04-07 0:04 ` Simon Marchi
2017-04-07 1:56 ` Pedro Alves
2017-04-07 3:21 ` Simon Marchi
2017-04-07 3:34 ` [pushed] " Simon Marchi
2017-04-07 9:25 ` [PATCH v2] " Philipp Rudo
2017-04-07 10:48 ` Pedro Alves [this message]
2017-04-07 14:34 ` Simon Marchi
2017-04-07 14:35 ` [pushed] ptid-selftests: Fix erroneous assert messages Simon Marchi
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=5adec1b9-2faf-d8af-0116-c237ee591738@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=prudo@linux.vnet.ibm.com \
--cc=simon.marchi@ericsson.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