This is the mail archive of the gcc-bugs@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]

[Bug c/84887] missing semicolon: further improvements


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84887

--- Comment #1 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
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
     ~^

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