c++/9975: time defined in :: namespace
azsro001@sneakemail.com
azsro001@sneakemail.com
Thu Mar 6 07:16:00 GMT 2003
>Number: 9975
>Category: c++
>Synopsis: time defined in :: namespace
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Mar 06 07:06:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: azsro001@sneakemail.com
>Release: 3.0.4
>Organization:
>Environment:
redhat 8.0
>Description:
time is defined as ::time instead of only as ::std::time
(same for other functions in time.h). This is a problem since it causes ambiguities/conflicts when a user wants to do something like
using mynamespace::time;
time t;
>How-To-Repeat:
The following code compiles:
#include <ctime>
int main ()
{
int k = time(NULL);
return 0;
};
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list