public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: jmc@xisl.com To: gcc-gnats@gcc.gnu.org Subject: c++/9044: Incorrect error report about constant member not being initialised Date: Mon, 23 Dec 2002 12:26:00 -0000 [thread overview] Message-ID: <20021223202435.15867.qmail@sources.redhat.com> (raw) >Number: 9044 >Category: c++ >Synopsis: Incorrect error report about constant member not being initialised >Confidential: no >Severity: non-critical >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Mon Dec 23 12:26:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: John Collins >Release: g++-3.2 (GCC) 3.2 (OK with 2.96) >Organization: >Environment: Mandrake Linux 9.0 3.2-1mdk >Description: class class1 { public: int fld1; int fld2; }; class class2 { public: const unsigned type; int class1::*pmem; class2(const unsigned t, int class1::*aa) : type(t), pmem(aa) { } }; class2 inst1(0, &class1::fld1); class2 inst2(1, &class1::fld2); Compilation reports error 'uninitialized const member `class2::type' for the last two statements. Goes away if you remove the "pmem" member. >How-To-Repeat: >Fix: Remove "const" from members in class with pointer to member fields in. >Release-Note: >Audit-Trail: >Unformatted:
next reply other threads:[~2002-12-23 20:26 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-12-23 12:26 jmc [this message] 2002-12-23 12:46 Andrew Pinski 2003-01-06 22:38 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=20021223202435.15867.qmail@sources.redhat.com \ --to=jmc@xisl.com \ --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).