This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
RE: c++/6664: Doesn't differentiate between functions and namespaces as symbols
- From: "Dale Peakall" <dale dot peakall at bit-arts dot com>
- To: nobody at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 28 Jun 2002 14:56:02 -0000
- Subject: RE: c++/6664: Doesn't differentiate between functions and namespaces as symbols
- Reply-to: "Dale Peakall" <dale dot peakall at bit-arts dot com>
The following reply was made to PR c++/6664; it has been noted by GNATS.
From: "Dale Peakall" <dale.peakall@bit-arts.com>
To: <lerdsuwa@gcc.gnu.org>,
<dale@peakall.net>,
<gcc-bugs@gcc.gnu.org>,
<gcc-prs@gcc.gnu.org>,
<nobody@gcc.gnu.org>,
<gcc-gnats@gcc.gnu.org>
Cc:
Subject: RE: c++/6664: Doesn't differentiate between functions and namespaces as symbols
Date: Fri, 28 Jun 2002 15:47:52 +0100
The example was:
#include <cmath>
namespace log
{
static const int a_var = 0;
}
int main()
{}
Fails to compile, due to a conflict between the log function and
namespace log.
So the real problem here, is the manner in which the standard library
imports functions into namespace std with a using directive.
The standard C++ header <cmath> should not specify functions at the
global scope, that interfere with namespace definitions like the one
above.
Can we re-open this defect report as a standard library bug?
> -----Original Message-----
> From: lerdsuwa@gcc.gnu.org [mailto:lerdsuwa@gcc.gnu.org]
> Sent: 05 June 2002 15:49
> To: dale@peakall.net; gcc-bugs@gcc.gnu.org; gcc-prs@gcc.gnu.org;
> nobody@gcc.gnu.org
> Subject: Re: c++/6664: Doesn't differentiate between functions and
> namespaces as symbols
>
>
> Synopsis: Doesn't differentiate between functions and
> namespaces as symbols
>
> State-Changed-From-To: open->closed
> State-Changed-By: lerdsuwa
> State-Changed-When: Wed Jun 5 07:49:01 2002
> State-Changed-Why:
> Not a bug. According to the standard section 7.3.1 p2,
> The identifier in an original-namespace-definition
> shall not have been previously defined in the declarative
> region in which the original-namespace-definition appears.
>
> http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&
> database=gcc&pr=6664
>
>
>