public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/20478] poor parse error diagnostic with missing right paren in vec<flow>())))
       [not found] <bug-20478-4@http.gcc.gnu.org/bugzilla/>
@ 2010-12-19 20:56 ` redi at gcc dot gnu.org
  2012-01-11 12:55 ` rguenth at gcc dot gnu.org
  2021-08-11 22:21 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2010-12-19 20:56 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |UNCONFIRMED
     Ever Confirmed|1                           |0

--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> 2010-12-19 20:55:54 UTC ---
99% of the original code is irrelevant to the parse error. This seems to be a
reasonable approximation of the testcase:

template<typename T>
struct opApi
{
  opApi(const char*, int);
};

template<typename T> struct vec { };

typedef int flow;

int deDup(int);
int pop(int, vec<flow>);

int main()
{
  opApi<flow> flowApis[2] = {
     opApi<flow>("", deDup(
      pop(0,
      vec<flow>())),
     opApi<flow>("", deDup(
      pop(0,
      vec<flow>())))
      };
}

then that can be further reduced to

struct opApi
{
  opApi(int);
};

struct vec { };

int deDup(vec);

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

}

Current releases don't complain about a missing default constructor (presumably
they stop after the earlier parse error).


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/20478] poor parse error diagnostic with missing right paren in vec<flow>())))
       [not found] <bug-20478-4@http.gcc.gnu.org/bugzilla/>
  2010-12-19 20:56 ` [Bug c++/20478] poor parse error diagnostic with missing right paren in vec<flow>()))) redi at gcc dot gnu.org
@ 2012-01-11 12:55 ` rguenth at gcc dot gnu.org
  2021-08-11 22:21 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-01-11 12:55 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/20478] poor parse error diagnostic with missing right paren in vec<flow>())))
       [not found] <bug-20478-4@http.gcc.gnu.org/bugzilla/>
  2010-12-19 20:56 ` [Bug c++/20478] poor parse error diagnostic with missing right paren in vec<flow>()))) redi at gcc dot gnu.org
  2012-01-11 12:55 ` rguenth at gcc dot gnu.org
@ 2021-08-11 22:21 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-11 22:21 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2012-01-11 00:00:00         |2021-8-11

--- Comment #11 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Clang produces:
<source>:18:13: error: expected ')'
            };
            ^
<source>:14:12: note: to match this '('
      opApi(deDup(
           ^
....

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-11 22:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-20478-4@http.gcc.gnu.org/bugzilla/>
2010-12-19 20:56 ` [Bug c++/20478] poor parse error diagnostic with missing right paren in vec<flow>()))) redi at gcc dot gnu.org
2012-01-11 12:55 ` rguenth at gcc dot gnu.org
2021-08-11 22:21 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).