public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: andrew@andypo.net To: gcc-gnats@gcc.gnu.org Subject: c++/9333: [3.4 regression] new parser rejects creation of complex templated class temporaries Date: Wed, 15 Jan 2003 20:26:00 -0000 [thread overview] Message-ID: <20030115201707.29342.qmail@sources.redhat.com> (raw) >Number: 9333 >Category: c++ >Synopsis: [3.4 regression] new parser rejects creation of complex templated class temporaries >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: rejects-legal >Submitter-Id: net >Arrival-Date: Wed Jan 15 12:26:00 PST 2003 >Closed-Date: >Last-Modified: >Originator: Andrew Pollard >Release: gcc-3.4-20030115 >Organization: >Environment: i686-pc-linux-gnu on a PIII system >Description: This is probably related to the (now fixed) c++/9112 I assume that this is a bug in the new parser.... temporary.cxx: -------------- template<int foo> struct A1 { A1(int, int, int) {} }; template<int foo> struct A2 { A2(int, int) {} }; template<int foo> struct B { int b; void bar1() { A1<foo>(b, b, b); } void bar2() { A2<foo>(b, b); } void bar3() { A1<foo> a1(b, b, b); } }; -------------- % gcc34 -c temporary.cxx temporary.cxx: In member function `void B<foo>::bar1()': temporary.cxx:14: error: expected init-declarator temporary.cxx:14: error: expected `,' or `;' bar2() [ not as many constructor arguments ] and bar3() [using an explicit temporary] work. bar1() also works in gcc-3.3/gcc-3.2 and gcc-3.4 prior to the new parser merge. I also tried the online Comeau-C++ compiler and Intel icc-7.0 and they both accepted the code as well. >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted:
next reply other threads:[~2003-01-15 20:26 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-01-15 20:26 andrew [this message] 2003-01-15 20:56 Andrew Pollard 2003-01-15 21:44 bangerth 2003-01-23 0:24 mmitchel
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20030115201707.29342.qmail@sources.redhat.com \ --to=andrew@andypo.net \ --cc=gcc-gnats@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).