bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Reuben Thomas <rrt@sc3d.org>
To: bug-gnulib <bug-gnulib@gnu.org>
Subject: static_assert in G++
Date: Thu, 10 Jan 2019 12:17:29 +0000	[thread overview]
Message-ID: <CAOnWdoh9w0U5E-ahHtuu0oeG-VisRrRtvmiEpgGOSbp6TwvJcQ@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 941 bytes --]

I noticed this in lib/verify.h:

/* The condition (99 < __GNUC__) is temporary, until we know about the
   first G++ release that supports static_assert.  */
#if (99 < __GNUC__) && defined __cplusplus
# define _GL_HAVE_STATIC_ASSERT 1
#endif

The relevant commit is:

commit ef1271787
Author: Bruno Haible <bruno@clisp.org>
Date:   Sat Apr 9 02:12:11 2011 +0200

    verify: Fix syntax error with GCC 4.6 in C++ mode.

This is odd, since the GCC web page on C++11 support:
https://gcc.gnu.org/projects/cxx-status.html#cxx11

says that static assertions have been supported for C++ since GCC 4.3:

Static assertions N1720
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1720.html> GCC 4.3
<https://gcc.gnu.org/gcc-4.3/changes.html> __cpp_static_assert >= 200410

Assuming I'm failing to understand something, could the comment in verify.h
be clarified as to what exactly is missing, if indeed it still is?

-- 
https://rrt.sc3d.org

[-- Attachment #2: Type: text/html, Size: 2788 bytes --]

             reply	other threads:[~2019-01-10 12:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-10 12:17 Reuben Thomas [this message]
2019-01-10 20:08 ` static_assert in G++ Bruno Haible
2019-01-10 20:21   ` Reuben Thomas
2019-01-10 20:57     ` Bruno Haible

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

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

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

  git send-email \
    --in-reply-to=CAOnWdoh9w0U5E-ahHtuu0oeG-VisRrRtvmiEpgGOSbp6TwvJcQ@mail.gmail.com \
    --to=rrt@sc3d.org \
    --cc=bug-gnulib@gnu.org \
    /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).