public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: libstdc++/9975: time defined in :: namespace
@ 2003-03-07 17:46 Martin Sebor
  0 siblings, 0 replies; 3+ messages in thread
From: Martin Sebor @ 2003-03-07 17:46 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR libstdc++/9975; it has been noted by GNATS.

From: Martin Sebor <sebor@roguewave.com>
To: bangerth@dealii.org,  gcc-gnats@gcc.gnu.org
Cc:  
Subject: Re: libstdc++/9975: time defined in :: namespace
Date: Fri, 07 Mar 2003 10:36:59 -0700

 FWIW, the problem is that according to 17.4.1.2 and 17.4.2.1,
 Footnote 160, the <cxxx> headers must declare symbols only
 namespace std, while the <xxx.h> headers must declare the
 same symbols in both the global namespace and namespace std.
 AFAIK, this can only be done correctly (as if) by inclusion
 followed by using declarations, i.e.,
 
     // <cxxx>
     namespace std {
     extern "C" void foo ();
     // ...
     }
 
     // <xxx.h>
     #include <cxxx>
     using std::foo;
     // ...
 
 Regards
 Martin
 
 PS A better test case might be
 
 $ cat t.cpp; g++ -c t.cpp
 #include <ctime>
 enum { time };
 
 t.cpp:2: `time' redeclared as different kind of symbol
 /usr/include/time.h:81: previous declaration of `time_t time(time_t*)'
 
 > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9975
 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: libstdc++/9975: time defined in :: namespace
@ 2003-03-10 20:46 bangerth
  0 siblings, 0 replies; 3+ messages in thread
From: bangerth @ 2003-03-10 20:46 UTC (permalink / raw)
  To: azsro001, gcc-bugs, gcc-prs, nobody

Synopsis: time defined in :: namespace

State-Changed-From-To: feedback->analyzed
State-Changed-By: bangerth
State-Changed-When: Mon Mar 10 20:46:01 2003
State-Changed-Why:
    Analyzed by Martin.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9975


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: libstdc++/9975: time defined in :: namespace
@ 2003-03-06 14:16 bangerth
  0 siblings, 0 replies; 3+ messages in thread
From: bangerth @ 2003-03-06 14:16 UTC (permalink / raw)
  To: azsro001, gcc-bugs, gcc-prs, nobody

Synopsis: time defined in :: namespace

State-Changed-From-To: open->feedback
State-Changed-By: bangerth
State-Changed-When: Thu Mar  6 14:16:37 2003
State-Changed-Why:
    I fail to see the problem. The standard prescribes that the
    contents of C compatibility headers be available in both
    the global namespace and in namespace std. Could you explain
    what you think is wrong with gcc's implementation of this
    rule?
    
    Wolfgang

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9975


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-03-10 20:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-07 17:46 libstdc++/9975: time defined in :: namespace Martin Sebor
  -- strict thread matches above, loose matches on Subject: below --
2003-03-10 20:46 bangerth
2003-03-06 14:16 bangerth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).