From: Jan-Benedict Glaw Date: Sun, 31 Aug 2014 22:42:47 +0000 (+0000) Subject: Fix build error with Debian's 4.8.1-2 due to wrong declaration X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d96be87b665d2dcd96a3bf0c6e98a63ec8d7dbba;p=gcc.git Fix build error with Debian's 4.8.1-2 due to wrong declaration 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(). 2014-09-01 Jan-Benedict Glaw * config/mcore/mcore.c (try_constant_tricks): Fix declaration. From-SVN: r214772 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 553c9d49d2f..21f804b051d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2014-09-01 Jan-Benedict Glaw + + * config/mcore/mcore.c (try_constant_tricks): Fix declaration. + 2014-08-31 Gerald Pfeifer * doc/generic.texi (Deficiencies): Add note on exemplary mistakes. diff --git a/gcc/config/mcore/mcore.c b/gcc/config/mcore/mcore.c index b6e5f75c218..f96be21467c 100644 --- a/gcc/config/mcore/mcore.c +++ b/gcc/config/mcore/mcore.c @@ -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);