From: Ivo Doko <ivo.doko@gmail.com>
To: Jonathan Wakely <jwakely.gcc@gmail.com>
Cc: gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: A possible bug
Date: Tue, 07 Oct 2014 09:16:00 -0000 [thread overview]
Message-ID: <5433AF43.9070102@gmail.com> (raw)
In-Reply-To: <CAH6eHdRAzuo-dDSft17N04nmw=Ne2ydhp1_bxzReric2ce3j2A@mail.gmail.com>
On 2014-10-07 10:57, Jonathan Wakely wrote:
> It's probably simply
> https://gcc.gnu.org/wiki/VerboseDiagnostics#missing_static_const_definition
Thanks for the reply.
What you propose makes sense. At least, it definitely explains why the
error appears only without compiler optimisation (that was driving me
insane).
However, the only functions which access those static constexpr
variables are member functions of the very class in which those
variables are defined (or actually, there is only one function, because
only one overload of xorshift_engine::xorshiftgen (in file xorshift.h)
will be enabled at compile-time, depending on the class templete
parameters). As far as I can see, the problem should happen only if
static const(expr) variables are accessed outside the class/struct body.
Besides, this doesn't explain why the error happens for shift_2 and
shift_3 but not for shift_1 (keep in mind - function
xorshift_engine::xorshiftgen always accesses each of these three static
constexpr variables, in order).
next prev parent reply other threads:[~2014-10-07 9:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-07 5:01 Ivo Doko
2014-10-07 8:37 ` Ivo Doko
2014-10-07 8:57 ` Jonathan Wakely
2014-10-07 9:16 ` Ivo Doko [this message]
2014-10-07 10:45 ` Jonathan Wakely
2014-10-07 9:28 ` Ivo Doko
2014-10-07 10:48 ` Jonathan Wakely
2014-10-07 11:48 ` Ivo Doko
2014-10-07 11:49 ` Ivo Doko
2014-10-07 12:25 ` Jonathan Wakely
2014-10-07 12:25 ` Andrew Haley
2014-10-07 13:55 ` Ivo Doko
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=5433AF43.9070102@gmail.com \
--to=ivo.doko@gmail.com \
--cc=gcc-help@gcc.gnu.org \
--cc=jwakely.gcc@gmail.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).