public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: fonseca@mip.sdu.dk
To: gcc-gnats@gcc.gnu.org
Subject: c++/9022: using declaration accepted as using directive
Date: Fri, 20 Dec 2002 04:56:00 -0000	[thread overview]
Message-ID: <20021220125515.31975.qmail@sources.redhat.com> (raw)


>Number:         9022
>Category:       c++
>Synopsis:       using declaration accepted as using directive
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          accepts-illegal
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 20 04:56:02 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     fonseca@mip.sdu.dk
>Release:        confirmed with gcc-3.2 and gcc-2.95-3
>Organization:
>Environment:
confirmed under solaris-2.8, gnu/linux, and cygwin
>Description:
GCC currently accepts an invalid using declaration.

The first line marked with "// error" must not be accepted
because "org::gnu::gcc" is a namespace.

Warning: This information is based on my interpretation of http://anubis.dkuug.dk/jtc1/sc22/open/n2356

> >>
namespace org {
  namespace gnu {
    namespace gcc {
    }
  }
}

using org::gnu::gcc; // error - using declaration

using namespace org::gnu::gcc; // ok - using directive

class MyClass {
private:

  // the using declaration below is rejected as it should be
  // but for the wrong reason. the standard requires ANY
  // using declaration to be accepted as a member
  // declaration.
  // using org::gnu::gcc; // error - using declaration
};

int main() {
  return 0;
}
<<<
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


             reply	other threads:[~2002-12-20 12:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-20  4:56 fonseca [this message]
2002-12-20 19:13 bangerth
2003-05-18 10:42 lerdsuwa

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=20021220125515.31975.qmail@sources.redhat.com \
    --to=fonseca@mip.sdu.dk \
    --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: link
Be 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).