diff options
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-5.1/backport/0002-PR65858.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-5.1/backport/0002-PR65858.patch | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-5.1/backport/0002-PR65858.patch b/meta/recipes-devtools/gcc/gcc-5.1/backport/0002-PR65858.patch deleted file mode 100644 index e7a4fd792c..0000000000 --- a/meta/recipes-devtools/gcc/gcc-5.1/backport/0002-PR65858.patch +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | From 82e461dc9d53927de7dae667880b63c2d497172d Mon Sep 17 00:00:00 2001 | ||
2 | From: paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | ||
3 | Date: Fri, 1 May 2015 18:47:55 +0000 | ||
4 | Subject: [PATCH] /cp 2015-05-01 Paolo Carlini <paolo.carlini@oracle.com> | ||
5 | Prathamesh Kulharni <prathamesh.kulkarni@linaro.org> | ||
6 | |||
7 | PR c++/65858 | ||
8 | * typeck2.c (check_narrowing): Set ok = true when pedwarn returns | ||
9 | false. | ||
10 | |||
11 | /testsuite | ||
12 | 2015-05-01 Paolo Carlini <paolo.carlini@oracle.com> | ||
13 | Prathamesh Kulharni <prathamesh.kulkarni@linaro.org> | ||
14 | |||
15 | PR c++/65858 | ||
16 | * g++.dg/cpp0x/Wnarrowing3.C: New. | ||
17 | |||
18 | |||
19 | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-5-branch@222700 138bc75d-0d04-0410-961f-82ee72b054a4 | ||
20 | --- | ||
21 | Upstream-Status: Backport | ||
22 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
23 | |||
24 | gcc/cp/ChangeLog | 7 +++++++ | ||
25 | gcc/cp/typeck2.c | 7 ++++--- | ||
26 | gcc/testsuite/ChangeLog | 6 ++++++ | ||
27 | gcc/testsuite/g++.dg/cpp0x/Wnarrowing3.C | 6 ++++++ | ||
28 | 4 files changed, 23 insertions(+), 3 deletions(-) | ||
29 | create mode 100644 gcc/testsuite/g++.dg/cpp0x/Wnarrowing3.C | ||
30 | |||
31 | diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c | ||
32 | index 884957b..9a491aa 100644 | ||
33 | --- a/gcc/cp/typeck2.c | ||
34 | +++ b/gcc/cp/typeck2.c | ||
35 | @@ -959,9 +959,10 @@ check_narrowing (tree type, tree init, tsubst_flags_t complain) | ||
36 | else if (complain & tf_error) | ||
37 | { | ||
38 | global_dc->pedantic_errors = 1; | ||
39 | - pedwarn (EXPR_LOC_OR_LOC (init, input_location), OPT_Wnarrowing, | ||
40 | - "narrowing conversion of %qE from %qT to %qT inside { }", | ||
41 | - init, ftype, type); | ||
42 | + if (!pedwarn (EXPR_LOC_OR_LOC (init, input_location), OPT_Wnarrowing, | ||
43 | + "narrowing conversion of %qE from %qT to %qT " | ||
44 | + "inside { }", init, ftype, type)) | ||
45 | + ok = true; | ||
46 | global_dc->pedantic_errors = flag_pedantic_errors; | ||
47 | } | ||
48 | } | ||
49 | diff --git a/gcc/testsuite/g++.dg/cpp0x/Wnarrowing3.C b/gcc/testsuite/g++.dg/cpp0x/Wnarrowing3.C | ||
50 | new file mode 100644 | ||
51 | index 0000000..d2dd383 | ||
52 | --- /dev/null | ||
53 | +++ b/gcc/testsuite/g++.dg/cpp0x/Wnarrowing3.C | ||
54 | @@ -0,0 +1,6 @@ | ||
55 | +// PR c++/65858 | ||
56 | +// { dg-do compile { target c++11 } } | ||
57 | +// { dg-require-effective-target lto } | ||
58 | +// { dg-options "-flto -Wno-narrowing" } | ||
59 | + | ||
60 | +int x { 0.5 }; | ||
61 | -- | ||
62 | 2.1.4 | ||
63 | |||