This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/84887] missing semicolon: further improvements
- From: "dmalcolm at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 16 Mar 2018 01:56:24 +0000
- Subject: [Bug c/84887] missing semicolon: further improvements
- Auto-submitted: auto-generated
- References: <bug-84887-4@http.gcc.gnu.org/bugzilla/>
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
~^