public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "public at alisdairm dot net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/43947] [C++0x] constexpr should allow declaration without a definition
Date: Fri, 30 Apr 2010 13:16:00 -0000	[thread overview]
Message-ID: <20100430131527.10156.qmail@sourceware.org> (raw)
In-Reply-To: <bug-43947-17779@http.gcc.gnu.org/bugzilla/>



------- Comment #3 from public at alisdairm dot net  2010-04-30 13:15 -------
Subject: Re:  [C++0x] constexpr should allow declaration without a
         definition

I am aware constexpr is not fully supported, and checked with Jason before
filing this issue.

We believe that constexpr should currently support correct syntax checking, and
issues with syntax (not semantic) are valid for fixes in 4.5.

Clearly, there will be no support for using the result of a constexpr function
in constant expression, but it should act like a regular inline function, with
a few additional constraints.

This is actually impacting a project I am developing (home-brew STL
implementation) where I am currently placing constexpr where standard requires
it, but #defining it away until compilers support it.  GCC 4.5 fires off errors
in my code for detecting constexpr support, so I really don't want to #define
away a keyword if I can avoid it.

If the intent is that these parser issues will not be addressed in 4.5, then I
will revert my library to the old behaviour, but this would be a very useful
experiment if it could continue (looking at how code changes to live within
constexpr restrictions, that may affect how appropriate it is in practice for
all library uses if there is a runtime efficiency impact in
non-constant-expression usage)

On Apr 30, 2010, at 8:57 AM, paolo dot carlini at oracle dot com wrote:

> 
> 
> ------- Comment #2 from paolo dot carlini at oracle dot com  2010-04-30 12:57 -------
> Really, constexpr are *not* available yet, it seems definitely too early to
> file PRs (in retrospect, I think we should not have committed those parser
> bits, are causing a lot of counfusion :(
> 
> 
> -- 
> 
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43947
> 
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43947


  parent reply	other threads:[~2010-04-30 13:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-30 12:16 [Bug c++/43947] New: " public at alisdairm dot net
2010-04-30 12:56 ` [Bug c++/43947] " redi at gcc dot gnu dot org
2010-04-30 12:57 ` paolo dot carlini at oracle dot com
2010-04-30 13:16 ` public at alisdairm dot net [this message]
2010-04-30 15:42 ` paolo dot carlini at oracle dot com
     [not found] <bug-43947-4@http.gcc.gnu.org/bugzilla/>
2011-03-17  1:10 ` jason at gcc dot gnu.org

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=20100430131527.10156.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.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).