[LLVMbugs] [Bug 14702] New: Possible false positive in GCC complex header

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Dec 23 14:44:29 PST 2012


             Bug #: 14702
           Summary: Possible false positive in GCC complex header
           Product: clang
           Version: 3.2
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Static Analyzer
        AssignedTo: kremenek at apple.com
        ReportedBy: davidhunter22 at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

On a fairly standard Ubuntu 12.10 using clang 3.2 I get the following warning
from the GCC 4.7.2 complex header file

warning: Assigned value is garbage
      or undefined
          _M_value *= __t;
                   ^  ~~~
1 warning generated.

Looking at the header code

      template<typename _Tp>
        operator*=(const complex<_Tp>& __z)
          _ComplexT __t;
          __real__ __t = __z.real();
          __imag__ __t = __z.imag();
          _M_value *= __t;
          return *this;

I can't see why I should get this error as it looks like the __t variable is
not garbage.

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list