summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-4.8/wcast-qual-PR55383.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.8/wcast-qual-PR55383.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/wcast-qual-PR55383.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/wcast-qual-PR55383.patch b/meta/recipes-devtools/gcc/gcc-4.8/wcast-qual-PR55383.patch
new file mode 100644
index 0000000000..1c22bd8dbf
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.8/wcast-qual-PR55383.patch
@@ -0,0 +1,43 @@
1This is a backport from gcc bugzilla
2
3http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55383
4
5fixes wrong warning behavior which has no workaround
6other than disabling the warning
7
8Upstream-Status: Backport
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11
12Index: gcc-4.8.0/gcc/c/c-typeck.c
13===================================================================
14--- gcc-4.8.0.orig/gcc/c/c-typeck.c 2013-01-24 08:59:44.000000000 -0800
15+++ gcc-4.8.0/gcc/c/c-typeck.c 2013-03-26 17:28:30.286137332 -0700
16@@ -4464,7 +4464,7 @@
17 /* There are qualifiers present in IN_OTYPE that are not present
18 in IN_TYPE. */
19 warning_at (loc, OPT_Wcast_qual,
20- "cast discards %q#v qualifier from pointer target type",
21+ "cast discards %qv qualifier from pointer target type",
22 discarded);
23
24 if (added || discarded)
25Index: gcc-4.8.0/gcc/testsuite/c-c++-common/Wcast-qual-1.c
26===================================================================
27--- gcc-4.8.0.orig/gcc/testsuite/c-c++-common/Wcast-qual-1.c 2011-04-07 14:47:38.000000000 -0700
28+++ gcc-4.8.0/gcc/testsuite/c-c++-common/Wcast-qual-1.c 2013-03-26 17:31:56.454141202 -0700
29@@ -85,11 +85,11 @@
30 void
31 f4 (void * const **bar)
32 {
33- const void ***p9 = (const void ***) bar; /* { dg-warning "cast" } */
34+ const void ***p9 = (const void ***) bar; /* { dg-warning "cast discards .const. qualifier" } */
35 void * const **p11 = (void * const **) bar;
36- void ** const *p13 = (void ** const *) bar; /* { dg-warning "cast" } */
37+ void ** const *p13 = (void ** const *) bar; /* { dg-warning "cast discards .const. qualifier" } */
38 const void * const **p15 = (const void * const **) bar; /* { dg-warning "cast" } */
39- const void ** const *p17 = (const void ** const *) bar; /* { dg-warning "cast" } */
40+ const void ** const *p17 = (const void ** const *) bar; /* { dg-warning "cast discards .const. qualifier" } */
41 void * const * const * p19 = (void * const * const *) bar;
42 const void * const * const *p21 = (const void * const * const *) bar;
43 }