This is the mail archive of the gcc@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]

Re: diagnostic_for_decl


"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

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