This is the mail archive of the gcc-prs@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: c++/6257: C-library symbols enter global namespace


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

From: Phil Edwards <phil@jaj.com>
To: marc-oliver.gewaltig@hre-ftr.f.rd.honda.co.jp
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c++/6257: C-library symbols enter global namespace
Date: Thu, 25 Apr 2002 16:46:39 -0400

 On Thu, Apr 11, 2002 at 04:16:58PM -0000, marc-oliver.gewaltig@hre-ftr.f.rd.honda.co.jp wrote:
 > >Category:       c++
 
 This should be libstdc++, but GNATs won't let me fix that.  Hmmm.
 
 > >Release:        unknown-1.0
 
 This makes a difference.  Lots of stuff changed between 2.x and 3.x.
 
 > >Description:
 > The C++ standard states that 
 > - all C++ header files define their symbols in namespace std
 > - all C header files, used in the form <c*> define their symbol in
 >   namespace std (Annex D 5.2,3).
 > 
 > However, g++ puts C symbols in the global namespace,
 > even if included via <c**> headers.
 
 We know.  Interoperating with an arbitrary C library (which is what we are
 required to do) is quite difficult.  As yet very few people have volunteered
 to work on a solution, and those that have volunteered have very little time.
 Some of the partial solutions are in the source tree and can be turned on
 with the appropriate --enable options.
 
 To use your two examples, making this work on Linux should be much easier
 than on Solaris.
 
 
 > >Fix:
 > Put all C symbols in the namespace std, if included
 > by <c*> headers.
 
 You realize, of course, that this is completely useless?  "Fix the problem"
 is an implied answer.  If you'd like to help us work on an actual patch,
 we'd be very grateful.
 


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