Fix build error with Debian's 4.8.1-2 due to wrong declaration
commit7e0514b376493c3fc95dd79d58dea6bf2086e6ef
authorjbglaw <jbglaw@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 31 Aug 2014 22:42:47 +0000 (31 22:42 +0000)
committerjbglaw <jbglaw@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 31 Aug 2014 22:42:47 +0000 (31 22:42 +0000)
treea3be591b0dc468c8afb4aeaef7e8cd0949b5175c
parente275db477a7005101501abbcdfcbe52b882e04a2
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  <jbglaw@lug-owl.de>

* 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
gcc/ChangeLog
gcc/config/mcore/mcore.c