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]
Other format: [Raw text]

Re: Slightly extended example for named warnings


On Sun, 26 Jan 2003, Bruce Korb wrote:

> So, attached first is the generated diag-macro.h file,
> followed by the diff of a couple of sample source files.

We want to get rid of the _with_decl etc. diagnostic function variants 
(which required adding a few features present in the C++ front end - to 
specify a decl from which the location of a diagnostic is to be taken, 
etc. - to be added to the C front end) rather than carrying them over to a 
new scheme.

Of course an actual implementation would need appropriate changes to
xgettext if messages stop being visible as C strings in the source, and
functionality to extract message explanations into the main manual (and
explanations - if wanted in source rather than just using info anchors in
the manual and giving an info command that will go to the right point -
would need careful and separate review from the rest of the patch).  I
don't feel a need for this in the proof-of-concept examples, but I would
like to see an example of how this implementation method handles more
complicated cases - warnings which are enabled or disabled, and may or may
not be errors, depending on multiple flags.  For example, those in
<http://gcc.gnu.org/ml/gcc/2003-01/msg01158.html> which illustrates what
source could look like if the enabling/disabling is parsed from a string
at runtime.

-- 
Joseph S. Myers
jsm28@cam.ac.uk


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