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++/20478] poor parse error diagnostic with missing right paren in vec<flow>())))


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20478

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-01-11
     Ever Confirmed|0                           |1

--- Comment #10 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-11 12:54:24 UTC ---
Confirmed on trunk with

struct opApi
{
  opApi(int);
};

struct vec { };

int deDup(vec);

int main()
{
  opApi flowApis[2] = {
      opApi(deDup(
                  vec()),
            opApi(deDup(
                        vec()))
            };

}

which yields

t.C: In function 'int main()':
t.C:13:12: error: expected primary-expression before '(' token
t.C:17:6: error: expected ')' before '}' token

the first error is spurious, placing a ')' at the suggested position
of the 2nd error doesn't fix the bug.


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