This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: broken FE diagnostics wrt complex expressions
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: dberlin at dberlin dot org, jakub at redhat dot com, tromey at redhat dot com, gcc at gcc dot gnu dot org, gdr at integrable-solutions dot net
- Date: Wed, 13 Aug 2008 19:16:43 +0000 (UTC)
- Subject: Re: broken FE diagnostics wrt complex expressions
- References: <20080813175223.GA31009@redhat.com>
On Wed, 13 Aug 2008, Aldy Hernandez wrote:
> It seems to me that the only approach here would be to provide caret
> diagnostics, because reconstructing the original sources from GENERIC
> seems like a loosing proposition.
In some cases the only useful place to find the expression is in the
preprocessed sources, not the original sources, so you want to be able to
print an expression extracted from those not just one extracted from
pointers into the original sources. But in either case extracting an
expressions using some form of beginning and ending locations would give
better results than reconstructing a representation of the expression from
trees.
(This would involve keeping two locations for an expression rather than
one, but an opaque location_t cookie ought to be able to represent
locations in both original and preprocessed source so you shouldn't need
four locations.)
> But, is this slew of work even worth it? I for one think that the
> aforementioned PRs should at least be marked down considerably. 3 of
> them are P2s-- and I think they should be some Pn+5, and/or mark them as
> an enhancement request.
I set 35441 to P4, and Volker complained that it should have been P2
(though he didn't take me up on my invitation to reset it to P3 for
another RM to look at it).
I think it would certainly be reasonable to print <complex expression> for
anything unsupported instead of broken diagnostics, and to reclassify all
such bugs as wishlist requests for certain complex expressions to be
better supported in diagnostics.
--
Joseph S. Myers
joseph@codesourcery.com