This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: do not include diagnostic-core.h in toplev.h


On Thu, Jul 8, 2010 at 1:30 PM, Ramana Radhakrishnan
<ramana.radhakrishnan@arm.com> wrote:
>
> On Thu, 2010-07-08 at 06:23 +0200, Manuel López-Ibáñez wrote:
>> On 7 July 2010 21:25, Diego Novillo <dnovillo@google.com> wrote:
>> > On Tue, Jul 6, 2010 at 05:49, Manuel López-Ibáñez <lopezibanez@gmail.com> wrote:
>> >
>> >> 2010-07-06 ?Manuel López-Ibáñez ?<manu@gcc.gnu.org>
>> >>
>> >> ? ? ? ?* toplev.h: Do not include diagnostic-core.h.
>> >> ? ? ? ?Include diagnostic-core.h in every file that includes toplev.h.
>> >> ? ? ? ?* c-tree.h: Do not include toplev.h.
>> >>
>> >> c-family/
>> >> ? ? ? ?* c-common.h: Include diagnostic-core.h. Error if already
>> >> ? ? ? ?included.
>> >> ? ? ? ?* c-semantics.c: Do not define GCC_DIAG_STYLE here.
>> >> cp/
>> >> ? ? ? ?* cp-tree.h: Do not include toplev.h.
>> >>
>> >> java/
>> >> ? ? ? ?* Include diagnostic-core.h in every file that includes toplev.h.
>> >> ada/
>> >> ? ? ? ?* Include diagnostic-core.h in every file that includes toplev.h.
>> >> fortran/
>> >> ? ? ? ?* Include diagnostic-core.h in every file that includes toplev.h.
>> >> lto/
>> >> ? ? ? ?* Include diagnostic-core.h in every file that includes toplev.h.
>> >
>> > OK, though the CL should mention the affected files.
>>
>> Done. Committed as revision 161943.
>
>
> Sorry - didn't notice this before but won't this break bootstrap on
> every platform that uses error or any function in diagnostic-core.h in
> the backend machine description.
>
> For instance error is used in config/arm/neon.md to give errors in
> certain circumstances, thus shouldn't generated programs that use
> toplev.h also be corrected to include diagnostic-core.h in such cases.
> Thus the generator programs have to be audited to check which ones need
> to include diagnostic-core.h and which don't.
>
> /home/ramrad01/builds/build-161947/./prev-gcc/xgcc
> -B/home/ramrad01/builds/build-161947/./prev-gcc/
> -B/usr/local/armv7l-unknown-linux-gnueabi/bin/
> -B/usr/local/armv7l-unknown-linux-gnueabi/bin/
> -B/usr/local/armv7l-unknown-linux-gnueabi/lib/
> -isystem /usr/local/armv7l-unknown-linux-gnueabi/include
> -isystem /usr/local/armv7l-unknown-linux-gnueabi/sys-include ? ?-c ? -g
> -O2 -gtoggle -DIN_GCC ? -W -Wall -Wwrite-strings -Wcast-qual
> -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute
> -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings
> -Werror -Wold-style-definition -Wc++-compat -fno-common ?-DHAVE_CONFIG_H
> -I. -I. -I/home/ramrad01/sources/trunk/gcc
> -I/home/ramrad01/sources/trunk/gcc/.
> -I/home/ramrad01/sources/trunk/gcc/../include
> -I/home/ramrad01/sources/trunk/gcc/../libcpp/include
> -I/home/ramrad01/sources/trunk/gcc/../libdecnumber
> -I/home/ramrad01/sources/trunk/gcc/../libdecnumber/dpd -I../libdecnumber
> -DCLOOG_PPL_BACKEND ?-I/usr/include/libelf ?insn-output.c -o
> insn-output.o
> /home/ramrad01/sources/trunk/gcc/config/arm/neon.md: In function
> 'output_1491':
> /home/ramrad01/sources/trunk/gcc/config/arm/neon.md:4306:5: error:
> implicit declaration of function
> 'error' [-Werror=implicit-function-declaration]

Emitting diagnostics from the machine description?!  The above is
the right punishment you deserve for that ;))

Consider properly constraining the insns instead.

Richard.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]