This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: diagnostic_for_decl
- To: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Subject: Re: diagnostic_for_decl
- From: Gabriel Dos Reis <gdr at codesourcery dot com>
- Date: 25 Jul 2000 23:44:04 +0200
- Cc: gcc at gcc dot gnu dot org
- Organization: CodeSourcery, LLC
- References: <Pine.SOL.4.21.0007252206590.310-100000@red.csi.cam.ac.uk>
"Joseph S. Myers" <jsm28@cam.ac.uk> writes:
| Why are declarations of functions in diagnostic.c split between
| diagnostic.h and toplev.h?
Ideally, all diagnostic functions should be declared in diagnostic.h,
not toplev.h.
| I'd like diagnostic_for_decl to be non-static in order to create a
| pedwarn_c99_with_decl function: does this make sense within the overall
| diagnostic infrastructure, and if so, in which header should
| diagnostic_for_decl be declared?
I'd prefer not to move diagnostic_for_decl out of diagnostic.c --
it'll die shortly.
A pending patch -- which I'll check in as soon as I'm able to
rebootstrap current CVS, cf my report on gcc-bugs -- will add a more
convenient way to pass context to the diagnostic formatting machinery
(that functionnality is needed by the new C++ front-end tree
formatter, and was requested by Zack).
In the mean time, I would prefer you use pedwarn_c99, setting
lang_printer to an appropriate language specific tree formatter and
use a format specifier as exemplified in cp/.
Does it make sense for you?
-- Gaby
CodeSourcery, LLC http://www.codesourcery.com