From patchwork Thu Aug 28 22:00:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jan-Benedict Glaw X-Patchwork-Id: 384030 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 174FE1400E9 for ; Fri, 29 Aug 2014 08:00:21 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=lKV97Vhn0+jwEQkRBCFSe80go37EFAnVbnyMgkNfkeHsJeSSc4uLS 5SzvFjuATTVv1yMaevUvFK3k2wmfkNN8fsNu62ok7gtD0dhAULm6oYsjcPDKyHcy m2dDhzVBNB0esQQLWVBYxNHEBU0BPXPSyeuKn5fbjIUjTyr9UQxqyM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=98legw9jaxUdgyR8EP4zAmazsSk=; b=o1EdGTJnpAZpeOh4VTNQ rmoZS4VEHD5vjV2DYzFTeNen5SGjCXnlTsS2wz64z4yk4jAY4XGUTsVMiAyfb7nA OENfne+eqQNQmuEitTeJJEzsDBPT9fli8WeyObHonCwmUeC43VG2Ts8x0R0ihMnt WAudGnsbzWN+uJmpQA5lnQo= Received: (qmail 7513 invoked by alias); 28 Aug 2014 22:00:15 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 7502 invoked by uid 89); 28 Aug 2014 22:00:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: lug-owl.de Received: from lug-owl.de (HELO lug-owl.de) (195.71.106.12) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 28 Aug 2014 22:00:13 +0000 Received: by lug-owl.de (Postfix, from userid 1001) id 8C899F0257; Fri, 29 Aug 2014 00:00:07 +0200 (CEST) Date: Fri, 29 Aug 2014 00:00:07 +0200 From: Jan-Benedict Glaw To: gcc-patches@gcc.gnu.org, DJ Delorie Subject: [BUILDROBOT][PATCH] Fix warnings in the mep-elf target Message-ID: <20140828220006.GS12042@lug-owl.de> MIME-Version: 1.0 Content-Disposition: inline X-gpg-fingerprint: 250D 3BCF 7127 0D8C A444 A961 1DBD 5E75 8399 E1BB X-gpg-key: wwwkeys.de.pgp.net X-Echelon-Enable: howto poison arsenous mail psychological biological nuclear warfare test the bombastical terror of flooding the spy listeners explosion sex drugs and rock'n'roll X-TKUeV: howto poison arsenous mail psychological biological nuclear warfare test the bombastical terror of flooding the spy listeners explosion sex drugs and rock'n'roll User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Hi! The following patch silences two warnings in the mep-elf target, fixing the config-list.mk build: First one: ~~~~~~~~~~ g++ -c -DIN_GCC_FRONTEND -DIN_GCC_FRONTEND -g -O2 -DIN_GCC -DCROSS_DIRECTORY_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-overlength-strings -Werror -fno-common -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/../libdecnumber/dpd -I../libdecnumber -I../../../gcc/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/../libdecnumber -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 ‘void mep_pragma_coprocessor(cpp_reader*)’: ../../../gcc/gcc/config/mep/mep-pragma.c:271:18: error: ‘rclass’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 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 -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-overlength-strings -Werror -fno-common -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/../libdecnumber/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" redefined [-Werror] #define VECTOR_TYPE_P(t) (TREE_CODE(t) == 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) == 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): Rework to silence warning. * config/mep/mep.c (VECTOR_TYPE_P): Remove duplicate definition. MfG, JBG 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 != CPP_CHAR) goto syntax_error; class_letter = tree_to_uhwi (val); - if (class_letter >= 'A' && class_letter <= 'D') - switch (class_letter) - { - case 'A': - rclass = USER0_REGS; - break; - case 'B': - rclass = USER1_REGS; - break; - case 'C': - rclass = USER2_REGS; - break; - case 'D': - rclass = USER3_REGS; - break; - } - else + switch (class_letter) { + case 'A': + rclass = USER0_REGS; + break; + case 'B': + rclass = USER1_REGS; + break; + case 'C': + rclass = USER2_REGS; + break; + case 'D': + rclass = 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) == VECTOR_TYPE) - static tree mep_build_builtin_va_list (void) {