[Bug c/84887] missing semicolon: further improvements

2018-06-16 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84887

Eric Gallager  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2018-06-17
 Ever confirmed|0   |1
   Severity|normal  |enhancement

--- Comment #4 from Eric Gallager  ---
(In reply to Eric Gallager from comment #3)
> (In reply to Eric Gallager from comment #2)
> > link to thread on reddit?
> > 
> 
> Never mind, I found it:
> https://www.reddit.com/r/programming/comments/84oizv/
> usability_improvements_in_gcc_8/dvr93d4/
> I'll confirm this bug after finding the Hacker News one, too.

Actually never mind again; that link isn't necessary to confirm this bug.
ASSIGNED since there's an assignee.

[Bug c/84887] missing semicolon: further improvements

2018-03-16 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84887

--- Comment #3 from Eric Gallager  ---
(In reply to Eric Gallager from comment #2)
> link to thread on reddit?
> 

Never mind, I found it:
https://www.reddit.com/r/programming/comments/84oizv/usability_improvements_in_gcc_8/dvr93d4/
I'll confirm this bug after finding the Hacker News one, too.

[Bug c/84887] missing semicolon: further improvements

2018-03-15 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84887

Eric Gallager  changed:

   What|Removed |Added

 CC||egallager at gcc dot gnu.org

--- Comment #2 from Eric Gallager  ---
(In reply to David Malcolm from comment #0)
> 
> However, as suggested e.g. by oridb on Reddit, it would be more readable to
> talk about the previous logical unit, and emit:
> 
> t.c: In function ‘test’:
> t.c:3:12: error: expected ‘;’ after ‘42’ token
>return 42
> ^
> ;
> 
> or somesuch: e.g. should we highlight the preceding token as a secondary
> range, which would give:
> 
> t.c: In function ‘test’:
> t.c:3:12: error: expected ‘;’ after ‘42’ token
>return 42
>   ~~^
> ;
> 
> (I'm not sure either way)

link to thread on reddit?


(In reply to David Malcolm from comment #1)
> User "jancsika" on Hacker News points out:
> > [...] the output is visually confusing-- you have an arrow pointing one's
> > eye to the missing semicolon, but the underlined referent token is
> > two line  breaks away from it. Underlining the preceding "i" would put
> > the emphasized token and missing semi right next to each other.
> 
> and I agree, presumably we should print either just:
> 
> q.c:1:6: error: expected ‘;’ after ‘i’
>  int i
>   ^
> 
> or:
> 
> q.c:1:6: error: expected ‘;’ after ‘i’
>  int i
>  ~^

link to thread on Hacker News?

[Bug c/84887] missing semicolon: further improvements

2018-03-15 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84887

--- Comment #1 from David Malcolm  ---
Similarly, in :

  int i
  int j;

as of gcc 8 we now print:

q.c:1:6: error: expected ‘;’ before ‘int’
 int i
  ^
  ;
 int j;
 ~~~

User "jancsika" on Hacker News points out:
> [...] the output is visually confusing-- you have an arrow pointing one's
> eye to the missing semicolon, but the underlined referent token is
> two line  breaks away from it. Underlining the preceding "i" would put
> the emphasized token and missing semi right next to each other.

and I agree, presumably we should print either just:

q.c:1:6: error: expected ‘;’ after ‘i’
 int i
  ^

or:

q.c:1:6: error: expected ‘;’ after ‘i’
 int i
 ~^