[C++ PATCH]: warning on implicit float->int
Gabriel Dos Reis
Fri Mar 3 07:04:00 GMT 2000
Nathan Sidwell <firstname.lastname@example.org> writes:
| This passing of the context for diagnostics is awkward, and IMO the wrong
! ... In convert_for_initialization we need the same thing, and we
| have the hack of saving the error count, calling the functions and then
| seeing if we issued any errors, and if so emit some context. Ug!
| I think the right thing is to implement a little context stack for diagnostics
| which we can push closures onto. Then when emitting a diagnostic we simply
| invoke the top closure to generate the context information. No need to keep
| passing the stuff around or saving error counts. Does that sound good?
I would prefer not to waste resource on this stuff. I would prefer a
recursive descent parser (isn't there a plan to rewrite the parser?).
At that point we'll have the context.
Currently I'm working on turning cp/error.c and cp/errfn.c into
something less awkward to work with. We'll pass cp_thing an
output_buffer plus other useful flags for formatting purpose; we might
as well pass other data. The patch won't be ready before Monday
because I'll be out till Monday morning.
| > I'm not sure I agree. I haven't seen any complaints about this particular
| > warning.
| Is this one ok? comments about the context stack idea?
Maybe it is time to start to reimplement the parser. Mark, Jason?
CodeSourcery, LLC http://www.codesourcery.com
More information about the Gcc-patches