This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Move c_cpp_error prototype from c-tree.h to c-common.h (c/c++)
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Steven Bosscher <stevenb dot gcc at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Jason Merrill <jason at redhat dot com>
- Date: Fri, 28 May 2010 22:09:16 +0000 (UTC)
- Subject: Re: [patch] Move c_cpp_error prototype from c-tree.h to c-common.h (c/c++)
- References: <AANLkTimpV-uVGyfYfbk75TrOtBnd5lrEJj9bAFU9hQ8N@mail.gmail.com>
On Fri, 28 May 2010, Steven Bosscher wrote:
> Hello,
>
> Attached patch is the second step towards not including c-tree.h in c-common.c.
>
> c_cpp_error is implemented in c-common.c but prototyped in c-tree.h,
> creating a dependency of c-common code on the language specific
> (non-common) header file c-tree.h. I asked Joseph for help on how to
> fix this, and the patch implements the plan: Clean up the diagnostics
> attributes to use, then move the prototype.
>
> Bootstrapped & tested (c,c++,objc,obj-c++) on x86_64-unknown-linux-gnu.
> OK for trunk?
The C parts of the patch are OK. Though if in future all the various
toplev.h includes are cleaned up to include just diagnostic-core.h or such
other headers as toplev.h may be split into, comments such as:
> +/* In order for the format checking to accept the C frontend
> + diagnostic framework extensions, you must include this file before
> + toplev.h, not after. The C front end formats are a subset of those
(which you moved from one place to another) will need to change to
reference diagnostic-core.h.
--
Joseph S. Myers
joseph@codesourcery.com