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: [patch] Move c_cpp_error prototype from c-tree.h to c-common.h (c/c++)


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


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