summaryrefslogtreecommitdiff
path: root/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0035-wcast-qual-PR-55383.patch
diff options
context:
space:
mode:
Diffstat (limited to 'yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0035-wcast-qual-PR-55383.patch')
-rw-r--r--yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0035-wcast-qual-PR-55383.patch55
1 files changed, 55 insertions, 0 deletions
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0035-wcast-qual-PR-55383.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0035-wcast-qual-PR-55383.patch
new file mode 100644
index 000000000..be4cf4a73
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0035-wcast-qual-PR-55383.patch
@@ -0,0 +1,55 @@
+From deffdb0b2497a106061d3ea2c6a3fef4fba3445e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:39:51 +0400
+Subject: [PATCH 35/35] wcast-qual PR/55383
+
+This is a backport from gcc bugzilla
+
+http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55383
+
+This commit fixes a wrong warning behavior. This bug which has no
+workaround other than disabling the warning.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Backport
+---
+ gcc/c/c-typeck.c | 2 +-
+ gcc/testsuite/c-c++-common/Wcast-qual-1.c | 6 +++---
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c
+index ddb6d39..c624120 100644
+--- a/gcc/c/c-typeck.c
++++ b/gcc/c/c-typeck.c
+@@ -4464,7 +4464,7 @@ handle_warn_cast_qual (location_t loc, tree type, tree otype)
+ /* There are qualifiers present in IN_OTYPE that are not present
+ in IN_TYPE. */
+ warning_at (loc, OPT_Wcast_qual,
+- "cast discards %q#v qualifier from pointer target type",
++ "cast discards %qv qualifier from pointer target type",
+ discarded);
+
+ if (added || discarded)
+diff --git a/gcc/testsuite/c-c++-common/Wcast-qual-1.c b/gcc/testsuite/c-c++-common/Wcast-qual-1.c
+index 640e4f0..56382c7 100644
+--- a/gcc/testsuite/c-c++-common/Wcast-qual-1.c
++++ b/gcc/testsuite/c-c++-common/Wcast-qual-1.c
+@@ -85,11 +85,11 @@ f3 (void ***bar)
+ void
+ f4 (void * const **bar)
+ {
+- const void ***p9 = (const void ***) bar; /* { dg-warning "cast" } */
++ const void ***p9 = (const void ***) bar; /* { dg-warning "cast discards .const. qualifier" } */
+ void * const **p11 = (void * const **) bar;
+- void ** const *p13 = (void ** const *) bar; /* { dg-warning "cast" } */
++ void ** const *p13 = (void ** const *) bar; /* { dg-warning "cast discards .const. qualifier" } */
+ const void * const **p15 = (const void * const **) bar; /* { dg-warning "cast" } */
+- const void ** const *p17 = (const void ** const *) bar; /* { dg-warning "cast" } */
++ const void ** const *p17 = (const void ** const *) bar; /* { dg-warning "cast discards .const. qualifier" } */
+ void * const * const * p19 = (void * const * const *) bar;
+ const void * const * const *p21 = (const void * const * const *) bar;
+ }
+--
+1.7.10.4
+