Static src analysis of LibreOffice

John Smith lbalbalba at gmail.com
Tue Aug 7 01:40:25 PDT 2012


On Tue, Aug 7, 2012 at 8:57 AM, Stephan Bergmann <sbergman at redhat.com> wrote:
> On 08/06/2012 09:57 AM, John Smith wrote:
>>
>> I submitted a bug report : http://llvm.org/bugs/show_bug.cgi?id=13530
>
>
> Hm, -std=gnu++11 should be disabled for Clang on Fedora 17 (i.e., against
> GCC 4.7 headers) in LO due to
> <http://cgit.freedesktop.org/libreoffice/core/commit/?id=85b35ac289f661f64cdddd145deaf419f61f5d4c>
> "Detect failing Clang with GCC 4.7 headers and --std=gnu++0x scenarios."
>
> I had originally designed that changeset when using a home-built "clang
> version 3.1 (tags/RELEASE_31/final 160361)" (where I stumbled over the
> problem in some C++ code that included <vector>, so I used that in the
> check).  From your bug I see you are using a "clang version 3.2 (trunk
> 161295)," so I now retried with a fresh home-built Clang trunk ("clang
> version 3.2 (trunk 161398)"), and both of my Clang versions consistently
> fail to compile both
>
>   #include <vector>
>
> and
>
>   #include <iostream>
>
> (in each case choking on "use of undeclared identifier '__float128'").
>
> So I am not sure why your LO build tries to use --std=gnu++0x at all.
>
>
> Stephan
>
It's not clang/clang++ that is executed here: it's the
ccc-analyzer/c++-analyzer. It sits in front of the compiler you use,
which is still GCC in this case. After ccc-analyzer/c++-analyzer is
done with the analysis, it passes all parameters and arguments to the
actual compiler (GCC), which then proceeds to compile the code as
usual. Im guessing your fix is trying to detect which compiler is
used, and thats still (as it is intended) GCC, but doesnt notice the
analyzer sitting in front of it (again, as intended) . Since none of
the llvm/clang parts support the __float128 type, the error is still
produced by ccc-analyzer/c++-analyzer.

If you can try 'scan-build ./configure && scan-build make' on the
LibreOffice code, you should be able to reproduce it.

See this url for some details on how it works:
http://clang-analyzer.llvm.org/scan-build.html


Regards,


John Smith.


More information about the LibreOffice mailing list