This is the mail archive of the gcc-bugs@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]

libstdc++/1070: incorrect specialization of std::complex<float>



>Number:         1070
>Category:       libstdc++
>Synopsis:       incorrect specialization of std::complex<float>
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 15 05:06:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Frederik Schaffalitzky
>Release:        CVS checkout: gcc version 2.97 20001214 (experimental)
>Organization:
>Environment:
Linux shadow.robots.ox.ac.uk 2.2.17 #3 SMP Mon Nov 6 20:09:01 GMT 2000 i686 unknown
>Description:
In bits/std_complex.h, the explicit specialization for
one operator-= is wrong:

  template<typename _Tp>
    inline complex<float>&
    complex<float>::operator-=(const complex<_Tp>& __z)
    {
     __real__ _M_value -= __z.real();
     __imag__ _M_value -= __z.real();  // <--- here
     return *this;
    } 
>How-To-Repeat:

>Fix:
replace second __z.real() with __z.imag()
>Release-Note:
>Audit-Trail:
>Unformatted:

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