public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Vincent Lefevre <vincent+gcc@vinc17.org>
To: Daniel Santos <daniel.santos@pobox.com>
Cc: Joseph Myers <joseph@codesourcery.com>,
	Jonathan Wakely <jwakely.gcc@gmail.com>,
	Allan Sandfeld Jensen <linux@carewolf.com>,
	"gcc@gcc.gnu.org" <gcc@gcc.gnu.org>,
	Richard Henderson <rth@redhat.com>,
	Florian Weimer <fweimer@redhat.com>
Subject: Re: [RFC] GCC 8 Project proposal: Extensions supporting C Metaprogramming, pseudo-templates
Date: Mon, 15 May 2017 11:31:00 -0000	[thread overview]
Message-ID: <20170515113137.GB32647@cventin.lip.ens-lyon.fr> (raw)
In-Reply-To: <57c2e272-dc55-62a5-5984-382867468723@pobox.com>

On 2017-05-12 15:59:44 -0500, Daniel Santos wrote:
> [...] But from a conceptual standpoint, I believe the term
> "constant-expression" would be incorrect because the C standard
> defines this constraint: (6.6.3 of C11) "Constant expressions shall
> not contain assignment, increment, decrement, function-call, or
> comma operators, except when they are contained within a
> subexpression that is not evaluated." I definitely do need to study
> the C specs more carefully to make sure I fully understand how this
> is used and how it's changed over different revisions of the spec.

GCC already regards some function calls are acceptable in
constant expressions, when builtins are used, e.g. fabs (2.0),
contrary to Clang. The builtin is even used when <math.h> is
not included (note that Clang has the same behavior here). So,
there may be several issues. I've reported:

  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80756

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

  parent reply	other threads:[~2017-05-15 11:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-08 23:32 Daniel Santos
2017-05-09  9:36 ` Florian Weimer
2017-05-10  8:46   ` Daniel Santos
2017-05-09 13:29 ` Allan Sandfeld Jensen
2017-05-10  9:13   ` Daniel Santos
2017-05-10  9:24     ` Jonathan Wakely
2017-05-10 22:09       ` Daniel Santos
2017-05-11 10:12         ` Jonathan Wakely
2017-05-11 10:44           ` Marek Polacek
2017-05-11 14:35           ` Joseph Myers
2017-05-12 20:54             ` Daniel Santos
2017-05-12 21:03               ` Joseph Myers
2017-05-15 11:31               ` Vincent Lefevre [this message]
2017-05-12 15:49         ` Martin Sebor
2017-05-12 21:11           ` Daniel Santos

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=20170515113137.GB32647@cventin.lip.ens-lyon.fr \
    --to=vincent+gcc@vinc17.org \
    --cc=daniel.santos@pobox.com \
    --cc=fweimer@redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=joseph@codesourcery.com \
    --cc=jwakely.gcc@gmail.com \
    --cc=linux@carewolf.com \
    --cc=rth@redhat.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).