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: broken FE diagnostics wrt complex expressions


>>>>> "Aldy" == Aldy Hernandez <aldyh@redhat.com> writes:

Aldy> The error here is currently:
Aldy>   #'goto_expr' not supported by pp_c_expression#'bug.c: In function 'foo':
Aldy>   bug.c:4: error: called object  is not a function

Aldy> But, is this slew of work even worth it?  I for one think that the
Aldy> aforementioned PRs should at least be marked down considerably.  3 of
Aldy> them are P2s-- and I think they should be some Pn+5, and/or mark them as
Aldy> an enhancement request.

It would be nice not to emit a completely bogus message like that,
even if we cannot immediately emit an excellent message.

Aldy> Are there any thoughts on this (the PRs, the caret diagnostics, plan of
Aldy> attack, etc?).

Caret diagnostics do seem like the way to go.

If you're interested in working on this, I think one way to do it
would be to start with a parser and make sure it always picks the
proper token from which to extract a location.  This is a reasonable
amount of work, and unfortunately much of it would have to be complete
before we could enable caret- or column-output.  (I have a few random
unsubmitted patches toward this direction, I can forward them if you
are interested.)

I suspect that there's some work fixing optimization passes.  I have
not looked but I would not be surprised if some of them pick locations
poorly when rearranging things.

My full wish here, getting rid of input_location, requires changes all
over.  E.g., the location should be an argument to build_decl; that
alone has hundreds of calls.

As far as I know nobody is actively working on any of this, though
MaÃuel and I talk about it sporadically.

Tom


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