public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: lassi.tuura@cern.ch To: gcc-gnats@gcc.gnu.org Subject: c++/7529: "using std::rel_ops::operator!=;" not accepted at function scope by GCC 3.1 Date: Wed, 07 Aug 2002 11:16:00 -0000 [thread overview] Message-ID: <20020807181504.24497.qmail@sources.redhat.com> (raw) >Number: 7529 >Category: c++ >Synopsis: "using std::rel_ops::operator!=;" not accepted at function scope by GCC 3.1 >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: rejects-legal >Submitter-Id: net >Arrival-Date: Wed Aug 07 11:16:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Lassi A. Tuura >Release: 3.1 >Organization: >Environment: Reading specs from /usr/local/cluster/gcc-3.1/objdir/bin/../lib/gcc-lib/i686-pc-linux-gnu/3.1/specs Configured with: ../configure --prefix=/usr/local/cluster/gcc-3.1/objdir/ Thread model: single gcc version 3.1 >Description: G++ rejects what by my reading seems like a valid using-declaration. $ /usr/local/cluster/gcc-3.1/objdir/bin/c++ -c foo.cc foo.cc: In function `void f()': foo.cc:3: parse error before `operator' foo.cc:3: `I' undeclared (first use this function) foo.cc:3: (Each undeclared identifier is reported only once for each function it appears in.) foo.cc:3: `i' undeclared (first use this function) >How-To-Repeat: >Fix: Workaround is to either move the using-declaration out of the function to the file scope, or turn it in the function scope to: using namespace std::rel_ops; >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: text/plain; name="foo.cc" Content-Disposition: inline; filename="foo.cc" #include <utility> struct I { bool operator== (const I &) const; }; void f () { using std::rel_ops::operator!=; I i; i != i; }
reply other threads:[~2002-08-07 18:16 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20020807181504.24497.qmail@sources.redhat.com \ --to=lassi.tuura@cern.ch \ --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).