From patchwork Sun Aug 31 22:51:50 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: 384599 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 B5CD614007D for ; Mon, 1 Sep 2014 08:52:04 +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=cPimoAn4S1hSDUKfvj6rpnY5LM8RcYUSV26+DxsWQg3Kc5t4IUk23 JJPWKQJoNAZHOu9MwKZcto56+S9zBfsnfMiEPQ5ewSoofKEagFVONvy+ZCaxs+oQ z9bPR5dzRYjPnpnc43kgfa7rFY7oOZnFcp+Dn8bfG+RPsLTu4luf9s= 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=52rfS7hte7/IBfWQvgfoTE8tmyU=; b=N3rJgSppzCtTBnJGVWF7 3zvxbjAbm0ZFRLmrdDWF+oHxF8QQF8+mZkbdQeKRussQcAo6imZS53BxNVJM7S1b DFmDxUr1r1Kd1+3bQmZQfvr4BDJ/uMRlbNORYFz9GYtvr6/03Dtfr8T6ecBjLiau ci5CtSxT2zoAGlBBagzjcUY= Received: (qmail 12399 invoked by alias); 31 Aug 2014 22:51:57 -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 12389 invoked by uid 89); 31 Aug 2014 22:51:57 -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, 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; Sun, 31 Aug 2014 22:51:55 +0000 Received: by lug-owl.de (Postfix, from userid 1001) id 4EC03F024E; Mon, 1 Sep 2014 00:51:50 +0200 (CEST) Date: Mon, 1 Sep 2014 00:51:50 +0200 From: Jan-Benedict Glaw To: gcc-patches@gcc.gnu.org, Nick Clifton Subject: [BUILDROBOT][PATCH] mcore-elf: Fix bad declaration Message-ID: <20140831225150.GV12042@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! This patch fixes a non-matching declaration, which lets G++ 4.8.1 (as of Debian's g++ package) barf: 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 -fno-common -DHAVE_CONFIG_H -I. -I. -I/home/vaxbuild/repos/gcc/gcc -I/home/vaxbuild/repos/gcc/gcc/. -I/home/vaxbuild/repos/gcc/gcc/../include -I/home/vaxbuild/repos/gcc/gcc/../libcpp/include -I/home/vaxbuild/repos/gcc/gcc/../libdecnumber -I/home/vaxbuild/repos/gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I/home/vaxbuild/repos/gcc/gcc/../libbacktrace -o mcore.o -MT mcore.o -MMD -MP -MF ./.deps/mcore.TPo /home/vaxbuild/repos/gcc/gcc/config/mcore/mcore.c /home/vaxbuild/repos/gcc/gcc/config/mcore/mcore.c: In function ‘const char* output_inline_const(machine_mode, rtx_def**)’: /home/vaxbuild/repos/gcc/gcc/config/mcore/mcore.c:1216:82: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 5 has type ‘long long int’ [-Wformat=] sprintf (buf, "%s\n\tnot\t%s\t// %ld 0x%lx", load_op, dst_fmt, value, value); ^ /home/vaxbuild/repos/gcc/gcc/config/mcore/mcore.c:1216:82: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘long long int’ [-Wformat=] /home/vaxbuild/repos/gcc/gcc/config/mcore/mcore.c:1219:87: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 5 has type ‘long long int’ [-Wformat=] sprintf (buf, "%s\n\taddi\t%s,%%2\t// %ld 0x%lx", load_op, dst_fmt, value, value); ^ /home/vaxbuild/repos/gcc/gcc/config/mcore/mcore.c:1219:87: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘long long int’ [-Wformat=] /home/vaxbuild/repos/gcc/gcc/config/mcore/mcore.c:1222:87: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 5 has type ‘long long int’ [-Wformat=] sprintf (buf, "%s\n\tsubi\t%s,%%2\t// %ld 0x%lx", load_op, dst_fmt, value, value); ^ /home/vaxbuild/repos/gcc/gcc/config/mcore/mcore.c:1222:87: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘long long int’ [-Wformat=] /home/vaxbuild/repos/gcc/gcc/config/mcore/mcore.c:1226:88: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 5 has type ‘long long int’ [-Wformat=] sprintf (buf, "%s\n\trsubi\t%s,%%2\t// %ld 0x%lx", load_op, dst_fmt, value, value); ^ /home/vaxbuild/repos/gcc/gcc/config/mcore/mcore.c:1226:88: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘long long int’ [-Wformat=] /home/vaxbuild/repos/gcc/gcc/config/mcore/mcore.c:1229:89: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 5 has type ‘long long int’ [-Wformat=] sprintf (buf, "%s\n\tbseti\t%s,%%P2\t// %ld 0x%lx", load_op, dst_fmt, value, value); ^ /home/vaxbuild/repos/gcc/gcc/config/mcore/mcore.c:1229:89: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘long long int’ [-Wformat=] /home/vaxbuild/repos/gcc/gcc/config/mcore/mcore.c:1232:89: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 5 has type ‘long long int’ [-Wformat=] sprintf (buf, "%s\n\tbclri\t%s,%%Q2\t// %ld 0x%lx", load_op, dst_fmt, value, value); ^ /home/vaxbuild/repos/gcc/gcc/config/mcore/mcore.c:1232:89: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘long long int’ [-Wformat=] /home/vaxbuild/repos/gcc/gcc/config/mcore/mcore.c:1235:88: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 5 has type ‘long long int’ [-Wformat=] sprintf (buf, "%s\n\trotli\t%s,%%2\t// %ld 0x%lx", load_op, dst_fmt, value, value); ^ /home/vaxbuild/repos/gcc/gcc/config/mcore/mcore.c:1235:88: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘long long int’ [-Wformat=] /home/vaxbuild/repos/gcc/gcc/config/mcore/mcore.c:1238:87: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 5 has type ‘long long int’ [-Wformat=] sprintf (buf, "%s\n\tlsli\t%s,%%2\t// %ld 0x%lx", load_op, dst_fmt, value, value); ^ /home/vaxbuild/repos/gcc/gcc/config/mcore/mcore.c:1238:87: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘long long int’ [-Wformat=] /home/vaxbuild/repos/gcc/gcc/config/mcore/mcore.c:1241:94: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 6 has type ‘long long int’ [-Wformat=] sprintf (buf, "%s\n\tixh\t%s,%s\t// %ld 0x%lx", load_op, dst_fmt, dst_fmt, value, value); ^ /home/vaxbuild/repos/gcc/gcc/config/mcore/mcore.c:1241:94: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 7 has type ‘long long int’ [-Wformat=] /home/vaxbuild/repos/gcc/gcc/config/mcore/mcore.c:1244:94: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 6 has type ‘long long int’ [-Wformat=] sprintf (buf, "%s\n\tixw\t%s,%s\t// %ld 0x%lx", load_op, dst_fmt, dst_fmt, value, value); ^ /home/vaxbuild/repos/gcc/gcc/config/mcore/mcore.c:1244:94: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 7 has type ‘long long int’ [-Wformat=] /home/vaxbuild/repos/gcc/gcc/config/mcore/mcore.c: At global scope: /home/vaxbuild/repos/gcc/gcc/config/mcore/mcore.c:100:19: warning: ‘int try_constant_tricks(long int, long long int*, long long int*)’ used but never defined [enabled by default] static int try_constant_tricks (long, HOST_WIDE_INT *, HOST_WIDE_INT *); ^ [...] g++ -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 -fno-common -DHAVE_CONFIG_H -static-libstdc++ -static-libgcc -o cc1 c/c-lang.o c-family/stub-objc.o attribs.o c/c-errors.o c/c-decl.o c/c-typeck.o c/c-convert.o c/c-aux-info.o c/c-objc-common.o c/c-parser.o c/c-array-notation.o c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o c-family/c-format.o c-family/c-gimplify.o c-family/c-lex.o c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o c-family/c-ppoutput.o c-family/c-pragma.o c-family/c-pretty-print.o c-family/c-semantics.o c-family/c-ada-spec.o c-family/c-cilkplus.o c-family/array-notation-common.o c-family/cilk.o c-family/c-ubsan.o default-c.o \ cc1-checksum.o libbackend.a main.o tree-browser.o libcommon-target.a libcommon.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a ../libcpp/libcpp.a ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -lmpc -lmpfr -lgmp -rdynamic -ldl -L../zlib -lz libbackend.a(mcore.o): In function `mcore_const_ok_for_inline': /home/vaxbuild/repos/gcc/gcc/config/mcore/mcore.c:751: undefined reference to `try_constant_tricks(long, long long*, long long*)' libbackend.a(mcore.o): In function `mcore_const_ok_for_inline(long long)': /home/vaxbuild/repos/gcc/gcc/config/mcore/mcore.c:751: undefined reference to `try_constant_tricks(long, long long*, long long*)' libbackend.a(mcore.o): In function `mcore_const_trick_uses_not(long long)': /home/vaxbuild/repos/gcc/gcc/config/mcore/mcore.c:761: undefined reference to `try_constant_tricks(long, long long*, long long*)' libbackend.a(mcore.o): In function `mcore_const_ok_for_inline': /home/vaxbuild/repos/gcc/gcc/config/mcore/mcore.c:751: undefined reference to `try_constant_tricks(long, long long*, long long*)' collect2: error: ld returned 1 exit status make[1]: *** [cc1] Error 1 make[1]: Leaving directory `/home/vaxbuild/build/mcore-elf/build-gcc/gcc' make: *** [all-gcc] Error 2 This patch fixes only the wrong declaration of try_constant_tricks(). Committed as obvious, including a small whitespace fix in the following declaration. It doesn't fix the other long vs. long long warnings though... 2014-09-01 Jan-Benedict Glaw * config/mcore/mcore.c (try_constant_tricks): Fix declaration. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214772 138bc75d-0d04-0410-961f-82ee72b054a4 diff --git a/gcc/config/mcore/mcore.c b/gcc/config/mcore/mcore.c index b6e5f75..f96be21 100644 --- a/gcc/config/mcore/mcore.c +++ b/gcc/config/mcore/mcore.c @@ -97,7 +97,7 @@ cond_type; static void output_stack_adjust (int, int); static int calc_live_regs (int *); -static int try_constant_tricks (long, HOST_WIDE_INT *, HOST_WIDE_INT *); +static int try_constant_tricks (HOST_WIDE_INT, HOST_WIDE_INT *, HOST_WIDE_INT *); static const char * output_inline_const (enum machine_mode, rtx *); static void layout_mcore_frame (struct mcore_frame *); static void mcore_setup_incoming_varargs (cumulative_args_t, enum machine_mode, tree, int *, int); @@ -122,9 +122,9 @@ static bool mcore_print_operand_punct_valid_p (unsigned char code); static void mcore_unique_section (tree, int); static void mcore_encode_section_info (tree, rtx, int); static const char *mcore_strip_name_encoding (const char *); -static int mcore_const_costs (rtx, RTX_CODE); -static int mcore_and_cost (rtx); -static int mcore_ior_cost (rtx); +static int mcore_const_costs (rtx, RTX_CODE); +static int mcore_and_cost (rtx); +static int mcore_ior_cost (rtx); static bool mcore_rtx_costs (rtx, int, int, int, int *, bool); static void mcore_external_libcall (rtx);