[Bug c++/64228] compile error not accurate expected ; before string constant

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64228

Andrew Pinski  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #3 from Andrew Pinski  ---
>The caret location is enough to help programmer fix the build error.

So I am going to close this as won't fix.  I do think GCC can improve in other
areas dealing with error messages and there are many other open bugs dealing
those.

[Bug c++/64228] compile error not accurate expected ; before string constant

2021-08-27 Thread jg at jguk dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64228

--- Comment #2 from Jonny Grant  ---
(In reply to Andrew Pinski from comment #1)
> The trunk show:
> : In function 'int main()':
> :7:30: error: expected ';' before string constant
> 7 | std::cout << "oops " << i " number" << endl;
>   |  ^~
>   |  ;
> 
> Error recovery is always hard even saying << might be wrong when you want +.

Hi Andrew
You're right. The suggestion might not be what was desired. The caret location
is enough to help programmer fix the build error.

[Bug c++/64228] compile error not accurate expected ; before string constant

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64228

Andrew Pinski  changed:

   What|Removed |Added

   Severity|normal  |enhancement
 Ever confirmed|0   |1
   Last reconfirmed||2021-08-27
 Status|UNCONFIRMED |NEW

--- Comment #1 from Andrew Pinski  ---
The trunk show:
: In function 'int main()':
:7:30: error: expected ';' before string constant
7 | std::cout << "oops " << i " number" << endl;
  |  ^~
  |  ;

Error recovery is always hard even saying << might be wrong when you want +.