From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1273 invoked by alias); 28 Aug 2014 22:47:13 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 1259 invoked by uid 89); 28 Aug 2014 22:47:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-la0-f45.google.com Received: from mail-la0-f45.google.com (HELO mail-la0-f45.google.com) (209.85.215.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 28 Aug 2014 22:47:10 +0000 Received: by mail-la0-f45.google.com with SMTP id pn19so1801315lab.4 for ; Thu, 28 Aug 2014 15:47:07 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.112.34.78 with SMTP id x14mr7305216lbi.38.1409266027266; Thu, 28 Aug 2014 15:47:07 -0700 (PDT) Received: by 10.25.23.204 with HTTP; Thu, 28 Aug 2014 15:47:07 -0700 (PDT) In-Reply-To: <20140828220006.GS12042@lug-owl.de> References: <20140828220006.GS12042@lug-owl.de> Date: Thu, 28 Aug 2014 22:47:00 -0000 Message-ID: Subject: Re: [BUILDROBOT][PATCH] Fix warnings in the mep-elf target From: Andrew Pinski To: Jan-Benedict Glaw Cc: GCC Patches , DJ Delorie Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg02610.txt.bz2 On Thu, Aug 28, 2014 at 3:00 PM, Jan-Benedict Glaw wrot= e: > Hi! > > The following patch silences two warnings in the mep-elf target, > fixing the config-list.mk build: I thought -Werror was only on when the versions of GCC match. Thanks, Andrew > > > First one: > ~~~~~~~~~~ > g++ -c -DIN_GCC_FRONTEND -DIN_GCC_FRONTEND -g -O2 -DIN_GCC -DCROSS_DIRE= CTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W = -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute= -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-ov= erlength-strings -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../../gc= c/gcc -I../../../gcc/gcc/. -I../../../gcc/gcc/../include -I../../../gcc/gcc= /../libcpp/include -I/opt/cfarm/mpc/include -I../../../gcc/gcc/../libdecnu= mber -I../../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I../../../gc= c/gcc/../libbacktrace -DCLOOG_INT_GMP -DCLOOG_INT_GMP -I. -I. -I../../..= /gcc/gcc -I../../../gcc/gcc/. -I../../../gcc/gcc/../include -I../../../gcc/= gcc/../libcpp/include -I/opt/cfarm/mpc/include -I../../../gcc/gcc/../libde= cnumber -I../../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I../../..= /gcc/gcc/../libbacktrace -DCLOOG_INT_GMP -DCLOOG_INT_GMP ../../../gcc/gcc= /config/mep/mep-pragma.c > ../../../gcc/gcc/config/mep/mep-pragma.c: In function =E2=80=98void mep_p= ragma_coprocessor(cpp_reader*)=E2=80=99: > ../../../gcc/gcc/config/mep/mep-pragma.c:271:18: error: =E2=80=98rclass= =E2=80=99 may be used uninitialized in this function [-Werror=3Dmaybe-unini= tialized] > enum reg_class rclass; > ^ > cc1plus: all warnings being treated as errors > make[2]: *** [mep-pragma.o] Error 1 > > > This is actually a misbehavior of current GCC, the code itself looks 100%= okay > to me. Shall I report that as a bug, too? > > > > Second one: > ~~~~~~~~~~~ > g++ -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -f= no-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-string= s -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wn= o-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-commo= n -DHAVE_CONFIG_H -I. -I. -I../../../gcc/gcc -I../../../gcc/gcc/. -I../../= ../gcc/gcc/../include -I../../../gcc/gcc/../libcpp/include -I/opt/cfarm/mpc= /include -I../../../gcc/gcc/../libdecnumber -I../../../gcc/gcc/../libdecnu= mber/dpd -I../libdecnumber -I../../../gcc/gcc/../libbacktrace -o mep.o -= MT mep.o -MMD -MP -MF ./.deps/mep.TPo ../../../gcc/gcc/config/mep/mep.c > ../../../gcc/gcc/config/mep/mep.c:3448:0: error: "VECTOR_TYPE_P" redefine= d [-Werror] > #define VECTOR_TYPE_P(t) (TREE_CODE(t) =3D=3D VECTOR_TYPE) > ^ > In file included from ../../../gcc/gcc/config/mep/mep.c:26:0: > ../../../gcc/gcc/tree.h:474:0: note: this is the location of the previous= definition > #define VECTOR_TYPE_P(TYPE) (TREE_CODE (TYPE) =3D=3D VECTOR_TYPE) > ^ > cc1plus: all warnings being treated as errors > make[2]: *** [mep.o] Error 1 > > > > > > This patch should fix it. Okay to apply? > > > 2014-08-28 Jan-Benedict Glaw > > * config/mep/mep-pragma.c (mep_pragma_coprocessor_subclass): Rewo= rk > to silence warning. > * config/mep/mep.c (VECTOR_TYPE_P): Remove duplicate definition. > > > diff --git a/gcc/config/mep/mep-pragma.c b/gcc/config/mep/mep-pragma.c > index 632e92d..7bda297 100644 > --- a/gcc/config/mep/mep-pragma.c > +++ b/gcc/config/mep/mep-pragma.c > @@ -274,24 +274,21 @@ mep_pragma_coprocessor_subclass (void) > if (type !=3D CPP_CHAR) > goto syntax_error; > class_letter =3D tree_to_uhwi (val); > - if (class_letter >=3D 'A' && class_letter <=3D 'D') > - switch (class_letter) > - { > - case 'A': > - rclass =3D USER0_REGS; > - break; > - case 'B': > - rclass =3D USER1_REGS; > - break; > - case 'C': > - rclass =3D USER2_REGS; > - break; > - case 'D': > - rclass =3D USER3_REGS; > - break; > - } > - else > + switch (class_letter) > { > + case 'A': > + rclass =3D USER0_REGS; > + break; > + case 'B': > + rclass =3D USER1_REGS; > + break; > + case 'C': > + rclass =3D USER2_REGS; > + break; > + case 'D': > + rclass =3D USER3_REGS; > + break; > + default: > error ("#pragma GCC coprocessor subclass letter must be in [ABCD]"= ); > return; > } > diff --git a/gcc/config/mep/mep.c b/gcc/config/mep/mep.c > index 3c71b95..eb0adf8 100644 > --- a/gcc/config/mep/mep.c > +++ b/gcc/config/mep/mep.c > @@ -3445,8 +3445,6 @@ mep_expand_builtin_saveregs (void) > return XEXP (regbuf, 0); > } > > -#define VECTOR_TYPE_P(t) (TREE_CODE(t) =3D=3D VECTOR_TYPE) > - > static tree > mep_build_builtin_va_list (void) > { > > > MfG, JBG > > -- > Jan-Benedict Glaw jbglaw@lug-owl.de +49-172-76084= 81 > Signature of: http://perl.plover.com/Questions.html > the second :