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++/61719] misleading error message


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.

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