From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6695 invoked by alias); 7 Mar 2003 17:46:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 6678 invoked by uid 71); 7 Mar 2003 17:46:01 -0000 Date: Fri, 07 Mar 2003 17:46:00 -0000 Message-ID: <20030307174601.6676.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Martin Sebor Subject: Re: libstdc++/9975: time defined in :: namespace Reply-To: Martin Sebor X-SW-Source: 2003-03/txt/msg00363.txt.bz2 List-Id: The following reply was made to PR libstdc++/9975; it has been noted by GNATS. From: Martin Sebor 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 headers must declare symbols only namespace std, while the 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., // namespace std { extern "C" void foo (); // ... } // #include using std::foo; // ... Regards Martin PS A better test case might be $ cat t.cpp; g++ -c t.cpp #include 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