diff options
author | Khem Raj <raj.khem@gmail.com> | 2011-04-30 12:37:47 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-05-05 11:54:44 +0100 |
commit | b0d5b9f12adbce2c4a0df6059f5671188cd32293 (patch) | |
tree | f376fcd2e5dcc46185d73d619ce2eec31320d812 /meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0023-PR-c-47504.patch | |
parent | 81859b136c0153e8d5be71d56e910dcc3e8cdb66 (diff) | |
download | openembedded-core-contrib-b0d5b9f12adbce2c4a0df6059f5671188cd32293.tar.gz |
gcc-4.6.0: Backport FSF 4.6 branch patches
This is set of bugfixes that has been done on
FSF gcc-4_2-branch since 4.6.0 was released
They will roll into 4.6.1 release once that
happens in coming approx 6 months time then
we can simply remove them thats the reason
so use a separate .inc file to define the
SRC_URI additions
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0023-PR-c-47504.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0023-PR-c-47504.patch | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0023-PR-c-47504.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0023-PR-c-47504.patch new file mode 100644 index 0000000000..23aebda2c1 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0023-PR-c-47504.patch @@ -0,0 +1,50 @@ +From 4ebec68ee3aee90ba13a4c4bc70afbb4a613468b Mon Sep 17 00:00:00 2001 +From: jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> +Date: Tue, 29 Mar 2011 14:24:19 +0000 +Subject: [PATCH 023/200] PR c++/47504 + * semantics.c (cxx_eval_constant_expression) [NOP_EXPR]: Don't let + the conversion set TREE_OVERFLOW. + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@171664 138bc75d-0d04-0410-961f-82ee72b054a4 + +index d23effe..5fe1414 100644 +--- a/gcc/cp/semantics.c ++++ b/gcc/cp/semantics.c +@@ -7030,6 +7030,11 @@ cxx_eval_constant_expression (const constexpr_call *call, tree t, + conversion. */ + return fold (t); + r = fold_build1 (TREE_CODE (t), to, op); ++ /* Conversion of an out-of-range value has implementation-defined ++ behavior; the language considers it different from arithmetic ++ overflow, which is undefined. */ ++ if (TREE_OVERFLOW_P (r) && !TREE_OVERFLOW_P (op)) ++ TREE_OVERFLOW (r) = false; + } + break; + +index 598cae6..2d614ec 100644 +--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-data2.C ++++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-data2.C +@@ -44,5 +44,4 @@ extern template struct A3<int, 510>; + + // Use. + A3<int, 1111> a31; +-// FIXME should this be an error? + A3<char, 9999> a32; // { dg-warning "overflow" } +diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-overflow2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-overflow2.C +new file mode 100644 +index 0000000..5d5749c +--- /dev/null ++++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-overflow2.C +@@ -0,0 +1,8 @@ ++// PR c++/47504 ++// { dg-options -std=c++0x } ++ ++char constexpr sub(char arg) ++{ return char(arg - char(1)); } ++ ++int main() ++{ static char constexpr m = sub(-1); } +-- +1.7.0.4 + |