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: complex.h


On Fri, Aug 10, 2012 at 7:00 PM, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
> Let's CC Gaby, who likes to keep an eye on patches involving <complex>

Thanks Jonathan.

The patch is OK -- though I suspect we should have a documentation note
about the extension of allowing other C99 complex functions in <complex.h>.

-- Gaby

>
>
> On 10 August 2012 20:17, Marc Glisse wrote:
>> Ping
>>
>> http://gcc.gnu.org/ml/gcc-patches/2012-07/msg01440.html
>>
>>
>> On Sat, 28 Jul 2012, Marc Glisse wrote:
>>
>>> Hello,
>>>
>>> here is a patch for PR54112. It does 2 things:
>>> * #undef complex after including the system's complex.h
>>> * in C++11, still include the system's complex.h
>>>
>>> The C++11 standard says that including complex.h is equivalent to
>>> including <complex>, with the rationale that a C++ compiler can't parse a
>>> C99 complex.h header. However, g++, as an extension, handles _Complex, so it
>>> makes sense to also provide the prototypes for cacos and other C99 complex
>>> math functions.
>>>
>>> Tested, no regression.
>>>
>>> (Cc: Benjamin, who wrote the header)
>>>
>>> 2012-07-28  Marc Glisse  <marc.glisse@inria.fr>
>>>
>>>        PR libstdc++/54112
>>>         * include/c_compatibility/complex.h: Undefine complex, always
>>>         include system's complex.h if present.
>>>         * testsuite/26_numerics/complex/c99.cc: New testcase.
>>>         * testsuite/17_intro/headers/c++1998/complex.cc: Likewise.
>>
>>
>> --
>> Marc Glisse


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