public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: have@ann.jussieu.fr To: gcc-gnats@gcc.gnu.org Subject: c++/10497: Bug #909 not closed : Spurious error using nested classes in constructor calls Date: Fri, 25 Apr 2003 13:26:00 -0000 [thread overview] Message-ID: <20030425131710.5673.qmail@sources.redhat.com> (raw) >Number: 10497 >Category: c++ >Synopsis: Bug #909 not closed : Spurious error using nested classes in constructor calls >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Fri Apr 25 13:26:00 UTC 2003 >Closed-Date: >Last-Modified: >Originator: have@ann.jussieu.fr >Release: 2.95, 3.0, 3.2, 3.3 >Organization: >Environment: Linux >Description: Bug #909 does not seem to be fixed even if it is closed. With g++ > 3.0, the error becomes: " error: type specifier omitted for parameter `Z' " >How-To-Repeat: // Just compile this code class A { public: struct Nested { Nested(int i) {} }; A(const Nested &n, int *p=0) { } }; class B { public: B(const A::Nested &n, int *p=0) { } B(const A &a, int *p=0) { } }; int main(void) { int *Z=0; int i=1; A a(A::Nested(i), Z); // ERROR: type specifier omitted for parameter A b(A::Nested(int(i)), Z); // ERROR: type specifier omitted for parameter A c(A::Nested((int)i), Z); // OK A d(A::Nested(1), Z); // OK A e(A::Nested(i)); // OK A f(i, Z); // OK B g(A::Nested(i), Z); // ERROR: type specifier omitted for parameter B h(i, Z); // OK } >Fix: >Release-Note: >Audit-Trail: >Unformatted:
next reply other threads:[~2003-04-25 13:26 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-04-25 13:26 have [this message] 2003-04-25 13:36 Andrew Pinski 2003-04-25 13:46 Gabriel Dos Reis 2003-04-25 15:06 bangerth
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=20030425131710.5673.qmail@sources.redhat.com \ --to=have@ann.jussieu.fr \ --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).