This is the mail archive of the gcc@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]

Re: Namespace for <cfoo> headers incorrect?


On Fri, Mar 28, 2003 at 01:57:43PM -0800, Mike Stump wrote:
> On Friday, March 28, 2003, at 12:42 PM, Eric Lemings wrote:
> >Correct me if I'm wrong but I don't think code like the following is 
> >legal
> >according to the Standard (and I just read the Standard) but I just 
> >compiled
> >it with gcc 3.2.2:
> >
> >#include <ctime> // or any <cfoo> header
> >
> >int main (void) {
> >  time (NULL);  // or any name in <cfoo>
> >  return (0);
> >}
> >
> >The problem is that the Standard says that names in <cfoo> are 
> >declared in
> >the std namespace.  The code above should require a using directive or
> >explicit qualification.  No?
> 
> NULL is a macro?!  Macro's don't yet have namespaces.

Presumably he meant time.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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