This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][ARM] warning/Werror: implicit declaration of function 'arm_float_words_big_endian'
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Laurent GUERBY <laurent at guerby dot net>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>, Arnaud Charlet <charlet at adacore dot com>
- Date: Mon, 24 Aug 2009 09:44:51 +0100
- Subject: Re: [PATCH][ARM] warning/Werror: implicit declaration of function 'arm_float_words_big_endian'
- References: <1251046256.5031.23.camel@localhost>
On Sun, 2009-08-23 at 18:50 +0200, Laurent GUERBY wrote:
> Hi,
>
> While compiling Ada on arm I get a warning about
> arm_float_words_big_endian in stage1 and it becomes an error due to
> -Werror in later stages:
>
> gcc -c -g -fkeep-inline-functions -DIN_GCC -W -Wall -Wwrite-strings
> -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
> -Wmissing-format-attribute -Wno-long-long -Wno-variadic-macros
> -Wno-overlength-strings -Wold-style-definition -Wc++-compat -fno-common
> -DHAVE_CONFIG_H -I.. -I. -Iada -I../../trunk/gcc -I../../trunk/gcc/ada
> -I../../trunk/gcc/../include -I../../trunk/gcc/../libcpp/include
> -I/opt/cfarm/mpfr-2.4.1//include -I../../trunk/gcc/../libdecnumber
> -I../../trunk/gcc/../libdecnumber/dpd
> -I../libdecnumber ../../trunk/gcc/ada/gcc-interface/targtyps.c -o
> ada/targtyps.o
> ../../trunk/gcc/ada/gcc-interface/targtyps.c: In function
> 'get_float_words_be':
> ../../trunk/gcc/ada/gcc-interface/targtyps.c:197: warning: implicit
> declaration of function 'arm_float_words_big_endian'
>
> Looking at the code:
>
> ada/gcc-interface/targtyps.c =>
>
> #ifndef FLOAT_WORDS_BIG_ENDIAN
> #define FLOAT_WORDS_BIG_ENDIAN WORDS_BIG_ENDIAN
> #endif
>
> Nat
> get_float_words_be (void)
> {
> return FLOAT_WORDS_BIG_ENDIAN;
> }
>
> config/arm.h =>
>
> /* Define this if most significant word of doubles is the lowest
> numbered.
> The rules are different based on whether or not we use FPA-format,
> VFP-format or some other floating point co-processor's format
> doubles. */
> #define FLOAT_WORDS_BIG_ENDIAN (arm_float_words_big_endian ())
>
> Looking around for a header definition I found:
>
> config/arm-protos.h =>
>
> extern int arm_float_words_big_endian (void);
>
> arm-protos.h seem to be indirectly included through the generated
> "tm_p.h" in various GCC source files.
>
> Is the patch below the correct way to fix this warning/error?
>
> Thanks in advance,
>
> Laurent
>
> 2009-08-23 Laurent GUERBY <laurent@guerby.net>
>
> * gcc-interface/targtyps.c: Add missing include for tm_p.h.
Looks sensible to me; but I know nothing about the ada back-end, so I
don't think I can approve this.
R.