Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <qiyaoltc@gmail.com>
To: Simon Marchi <simon.marchi@ericsson.com>
Cc: <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Replace gdb_static_assert with static_assert
Date: Tue, 05 Dec 2017 16:29:00 -0000	[thread overview]
Message-ID: <86shcpp280.fsf@gmail.com> (raw)
In-Reply-To: <1512422710-26693-1-git-send-email-simon.marchi@ericsson.com>	(Simon Marchi's message of "Mon, 4 Dec 2017 16:25:10 -0500")

Simon Marchi <simon.marchi@ericsson.com> writes:

> gdb/ChangeLog:
>
>	* common/gdb_assert.h: Remove.

        * common/gdb_assert.h (gdb_static_assert): Remove.

because you don't remove this file.

> -/* A static assertion.  This will cause a compile-time error if EXPR,
> -   which must be a compile-time constant, is false.  */
> -
> -#define gdb_static_assert(expr) \
> -  extern int never_defined_just_used_for_checking[(expr) ? 1 : -1]

Did you consider define gdb_static_assert as static_assert ((expr), "")?
You don't have to change anywhere else.  Additionally, one day we move
to c++17, we can replace gdb_static_assert with static_assert globally.

-- 
Yao (齐尧)


  reply	other threads:[~2017-12-05 16:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-04 21:26 Simon Marchi
2017-12-05 16:29 ` Yao Qi [this message]
2017-12-05 16:32   ` Simon Marchi
2017-12-05 21:21     ` 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=86shcpp280.fsf@gmail.com \
    --to=qiyaoltc@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --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