This is the mail archive of the
gcc-bugs@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: <lerdsuwa at gcc dot gnu dot org>,<dale at peakall dot net>,<gcc-bugs at gcc dot gnu dot org>,<gcc-prs at gcc dot gnu dot org>,<nobody at gcc dot gnu dot org>,<gcc-gnats at gcc dot gnu dot org>
- Date: Fri, 28 Jun 2002 15:47:52 +0100
- Subject: RE: c++/6664: Doesn't differentiate between functions and namespaces as symbols
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
>
>
>