Commit 98febda
Fix C++ __builtin_constant_p
We have two desires for interaction of __builtin_constant_p with
constexpr: 1) it should be a constant-expression even if its operands
are not, and 2) we shouldn't fold it to false prematurely when parsing a
constexpr function (c++/54021). We were having trouble with both of
these, and this patch fixes #1 without breaking gcc-mirror#2.
gcc/cp/
Backport from mainline
2015-04-28 Jason Merrill <[email protected]>
PR c++/65656
* constexpr.c (cxx_eval_builtin_function_call): Fix
__builtin_constant_p.
gcc/testsuite/
Backport from mainline
2015-04-28 Jason Merrill <[email protected]>
PR c++/65656
* g++.dg/cpp0x/constexpr-builtin3.C: New test.1 parent 440dcd8 commit 98febda
File tree
2 files changed
+28
-10
lines changed- gcc
- cp
- testsuite/g++.dg/cpp0x
2 files changed
+28
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1024 | 1024 | | |
1025 | 1025 | | |
1026 | 1026 | | |
1027 | | - | |
| 1027 | + | |
1028 | 1028 | | |
1029 | 1029 | | |
1030 | 1030 | | |
1031 | 1031 | | |
1032 | 1032 | | |
1033 | 1033 | | |
1034 | 1034 | | |
1035 | | - | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
1036 | 1040 | | |
1037 | | - | |
1038 | | - | |
1039 | | - | |
1040 | | - | |
1041 | | - | |
| 1041 | + | |
| 1042 | + | |
1042 | 1043 | | |
1043 | | - | |
1044 | | - | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
1045 | 1056 | | |
1046 | 1057 | | |
| 1058 | + | |
1047 | 1059 | | |
1048 | 1060 | | |
1049 | 1061 | | |
| |||
1226 | 1238 | | |
1227 | 1239 | | |
1228 | 1240 | | |
1229 | | - | |
| 1241 | + | |
1230 | 1242 | | |
1231 | 1243 | | |
1232 | 1244 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
0 commit comments