This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c++/9976: time defined in :: namespace


>Number:         9976
>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:16:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     azsro001 at sneakemail dot 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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]