This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/19628] [3.4/4.0 Regression] g++ no longer accepts __builtin_constant_p in constant-expressions
- From: "austern at apple dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jan 2005 20:17:14 -0000
- Subject: [Bug c++/19628] [3.4/4.0 Regression] g++ no longer accepts __builtin_constant_p in constant-expressions
- References: <20050125203257.19628.austern@apple.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From austern at apple dot com 2005-01-28 20:17 -------
This was undoubtedly caused by Mark's large checkin on 2003-01-29, which included changes to
constant-expression handling.
I do not believe the __builtin_constant_p change was deliberate. The intent behind this patch, as far as
I can tell, was to reject constructs that the C++ standard explicitly says are not constant-expressions,
such as "(1, 2)". It looks to me like rejecting GNU extensions like __builtin_constant_p in constant-
expressions was just a side effect.
As far as I can tell, rejecting __builtin_constant_p is a change that (a) was not deliberate; (b) is
undocumented; (c) introduced a C/C++ incompatbility; and (d) causes previously working code to
break. I think that justifies calling it a bug.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords|rejects-valid |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19628