public inbox for
help / color / mirror / Atom feed
Subject: c++/9022: using declaration accepted as using directive
Date: Fri, 20 Dec 2002 04:56:00 -0000	[thread overview]
Message-ID: <> (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
>Release:        confirmed with gcc-3.2 and gcc-2.95-3
confirmed under solaris-2.8, gnu/linux, and cygwin
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

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

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

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

class MyClass {

  // 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;



             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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* 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).