This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH]: warning on implicit float->int
- To: Nathan Sidwell <nathan at codesourcery dot com>
- Subject: Re: [C++ PATCH]: warning on implicit float->int
- From: Gabriel Dos Reis <gdr at codesourcery dot com>
- Date: 03 Mar 2000 16:03:59 +0100
- Cc: Jason Merrill <jason at cygnus dot com>, gcc-patches at gcc dot gnu dot org, j dot kuipers at chello dot nl
- Organization: CodeSorucery, LLC
- References: <38BA49F3.FE2D3D78@codesourcery.com> <u9aekljlvg.fsf@yorick.cygnus.com> <38BF92BA.9799E4F2@codesourcery.com>
Nathan Sidwell <nathan@codesourcery.com> writes:
[...]
|
| This passing of the context for diagnostics is awkward, and IMO the wrong
| thing.
Agreed.
! ... 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.
| Ok.
|
| Is this one ok? comments about the context stack idea?
Maybe it is time to start to reimplement the parser. Mark, Jason?
-- Gaby
CodeSourcery, LLC http://www.codesourcery.com