This is the mail archive of the gcc-patches@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: [C++ PATCH]: warning on implicit float->int


>>>>> Gabriel Dos Reis <gdr@codesourcery.com> writes:

 > ! ... 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.

I don't see how that follows; we would still want information about which
argument we're dealing with.

Nathan, I like your idea.  I'd hook it into lang_print_error_function, much
like maybe_print_template_context.

 > Maybe it is time to start to reimplement the parser.  Mark, Jason?

Long since time.

Jason

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