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]

[RF SPU testing] separate errors.c and diagnostic.c functions


The files errors.c and errors.h define and declare some diagnostics
functions that are used by the gen* programs. On the other hand,
toplev.h and diagnostic.c declare and define different diagnostics
functions used by the rest of the compiler.

We have been trying to keep the declarations of error, warning, etc.
found in errrors.h and toplev.h compatible. However, this has no
future at all. They do not need to be compatible since they are not
(or should not be) used in the same places. Moreover, being compatible
has allowed errors.h to sneak into some compiler files where it does
not belong. (I would prefer if errors.h and errors.c would rather be
called generrors.h and generrors.c)

There is a further reference to errors.h in ./gcc/config/spu/spu-c.c.
I am not sure whether that file is trying to use errors.c or
diagnostic.c functions, so I did not modify it. If someone can test
the patch and it breaks SPU, then errors.h should be replaced by
toplev.h.

Bootstrapped and regression tested on x86_64-unknown-linux-gnu with
--enable-languages=all,ada

OK for trunk?

2008-08-22  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	* errors.c (warning): Remove unused parameter 'opt'. Returns
	'void'.
	* errors.h: Remove bogus comment about compatibility.
	(warning): Update declaration.
	* genautomata.c: Update all calls to warning.
	* omega.c: Do not include errors.h.
	* gimple.c: Do not include errors.h. Include toplev.h.
	* tree-ssa-structalias.c: Do not include errors.h.
	* tree-ssa-reassoc.c: Do not include errors.h.

Attachment: fix-generrors.diff
Description: Text document


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