Re: broken FE diagnostics wrt complex expressions

2008-08-15 Thread Gabriel Dos Reis
On Wed, Aug 13, 2008 at 2:16 PM, Joseph S. Myers <[EMAIL PROTECTED]> wrote: > On Wed, 13 Aug 2008, Aldy Hernandez wrote: > > I think it would certainly be reasonable to print for > anything unsupported instead of broken diagnostics, and to reclassify all > such bugs as wishlist requests for certai

Re: broken FE diagnostics wrt complex expressions

2008-08-15 Thread Gabriel Dos Reis
On Wed, Aug 13, 2008 at 12:52 PM, Aldy Hernandez <[EMAIL PROTECTED]> 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. Hi Aldy, I agree with your analysis.

Re: broken FE diagnostics wrt complex expressions

2008-08-14 Thread Manuel López-Ibáñez
2008/8/14 Aldy Hernandez <[EMAIL PROTECTED]>: >> There are various issues that would need to be addressed to have >> decent caret diagnostics: > > Agreed. I think having caret diagnostics in place is a good first step, > if only because it'll make debugging of column diagnostics easier. > After th

Re: broken FE diagnostics wrt complex expressions

2008-08-14 Thread Aldy Hernandez
> There are various issues that would need to be addressed to have > decent caret diagnostics: Agreed. I think having caret diagnostics in place is a good first step, if only because it'll make debugging of column diagnostics easier. After this, we can modify the testsuite machinery to test colum

Re: broken FE diagnostics wrt complex expressions

2008-08-14 Thread Joseph S. Myers
On Wed, 13 Aug 2008, Aldy Hernandez wrote: > 1. beginning/ending locations functionality as Joseph suggests. Note that the GNU Coding Standards specify formats for diagnostics giving a range of locations; when GCC tracks such a range, it should use those formats (by default). source-file-

Re: broken FE diagnostics wrt complex expressions

2008-08-14 Thread Manuel López-Ibáñez
2008/8/13 Tom Tromey <[EMAIL PROTECTED]>: >> "Tom" == Tom Tromey <[EMAIL PROTECTED]> writes: > > Tom> As far as I know nobody is actively working on any of this, though > Tom> Mañuel and I talk about it sporadically. > > Crap, I misspelled his name while trying extra to get it right. > Sorry ab

Re: broken FE diagnostics wrt complex expressions

2008-08-14 Thread Manuel López-Ibáñez
2008/8/14 Aldy Hernandez <[EMAIL PROTECTED]>: >> Aldy> 1. beginning/ending locations functionality as Joseph suggests. >> Aldy> 2. make sure the parsers pick the proper token/location. >> Aldy> 3. error reporting machinery >> >> Aldy> How does this sound? >> >> It sounds good to me. #1 might be ha

Re: broken FE diagnostics wrt complex expressions

2008-08-14 Thread Manuel López-Ibáñez
2008/8/13 Aldy Hernandez <[EMAIL PROTECTED]>: > > 1. beginning/ending locations functionality as Joseph suggests. > 2. make sure the parsers pick the proper token/location. > 3. error reporting machinery There are various issues that would need to be addressed to have decent caret diagnostics: 1)

Re: broken FE diagnostics wrt complex expressions

2008-08-14 Thread Aldy Hernandez
> Aldy> 1. beginning/ending locations functionality as Joseph suggests. > Aldy> 2. make sure the parsers pick the proper token/location. > Aldy> 3. error reporting machinery > > Aldy> How does this sound? > > It sounds good to me. #1 might be hard, I have not looked into it. Well, we can alwa

Re: broken FE diagnostics wrt complex expressions

2008-08-13 Thread Chris Lattner
On Aug 13, 2008, at 12:16 PM, Joseph S. Myers wrote: 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

Re: broken FE diagnostics wrt complex expressions

2008-08-13 Thread Tom Tromey
Tom> I suspect that there's some work fixing optimization passes. I have Tom> not looked but I would not be surprised if some of them pick locations Tom> poorly when rearranging things. Aldy> But this has nothing to do with error messages. I mean, not initially. Yeah, it is somewhat indirect.

Re: broken FE diagnostics wrt complex expressions

2008-08-13 Thread Aldy Hernandez
> 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 e

Re: broken FE diagnostics wrt complex expressions

2008-08-13 Thread Mark Mitchell
Tom Tromey wrote: 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. Yes, I've advocated that for years. People consistently tell me that EDG's diagnostics are superior to GCC, in part because of E

Re: broken FE diagnostics wrt complex expressions

2008-08-13 Thread Tom Tromey
> "Tom" == Tom Tromey <[EMAIL PROTECTED]> writes: Tom> As far as I know nobody is actively working on any of this, though Tom> Mañuel and I talk about it sporadically. Crap, I misspelled his name while trying extra to get it right. Sorry about that. Tom

Re: broken FE diagnostics wrt complex expressions

2008-08-13 Thread Tom Tromey
> "Aldy" == Aldy Hernandez <[EMAIL PROTECTED]> 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 t

Re: broken FE diagnostics wrt complex expressions

2008-08-13 Thread Joseph S. Myers
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 pre