This is the mail archive of the gcc-patches@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: V3 PATCH to std_complex.h


"Joseph S. Myers" <jsm@polyomino.org.uk> writes:

| On Sun, 30 May 2004, Gabriel Dos Reis wrote:
| 
| > This patch makes V3 complex<> operations forward to GCC built-ins, now
| > that they are available in GCC-3.5.0.
| 
| Are there in principle namespace issues here, because the built-ins may
| expand to calls to C99 functions, and the names of those functions are not
| reserved in C++ so a conforming C++ program might define extern "C"  
| functions with those names but different semantics? 

In principle, yes.  Which reminds me that I grumbled about the scheme
__builtin_xxx expanding to call to xxx -- it is too C-centric.  A way
to fix that is to have it call __xxx.  
When linking, if we supply -lc before user .o files or libraries,
shouldn't that just work?

| The unconditional
| predefinition of _GNU_SOURCE and similar macros for C++ means there are
| much bigger ways in which the C namespace is not respected by g++ -ansi, 
| and I don't know if there are any current plans for fixing this (cf. 
| <http://gcc.gnu.org/ml/gcc/2001-06/msg00313.html>, many other discussions 
| and bug 11196), but it seems like something to bear in mind if there is an 
| aspiration to eventual full conformance to C++03.

Completely agreed.  

But, the current situation, where we're basically reimplementing the
same functions in V3 eventually leads to confusion. 

-- Gaby


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