[Bug c++/61719] misleading error message

manu at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jul 7 10:11:00 GMT 2014


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

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |error-recovery
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-07-07
                 CC|                            |manu at gcc dot gnu.org
     Ever confirmed|0                           |1
           Severity|minor                       |enhancement

--- Comment #1 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
Perhaps the parser could insert the missing parenthesis and continue, but
touching the parser this way is always tricky. There are many much worse cases
of error-recovery. Compared with Clang, we don't do so bad here:

test.cc:4:9: error: expected ')'
  int aa;
        ^
test.cc:3:16: note: to match this '('
  c(int a) : aa(a {}
               ^

Given the amount of bugs needing attention, I think this will be very low in
the priority queue. But if you wish to take a look, the code is in
gcc/cp/parser.c.


More information about the Gcc-bugs mailing list