[cfe-dev] Tool oddity

Sean Silva chisophugis at gmail.com
Wed Mar 25 18:53:58 PDT 2015


Although the errors don't look like it, could it be something like:
http://clang.llvm.org/docs/FAQ.html#i-get-errors-about-some-headers-being-missing-stddef-h-stdarg-h
 ?


-- Sean Silva

On Wed, Mar 25, 2015 at 6:37 PM, Peter Stirling <peter at pjstirling.plus.com>
wrote:

>  It doesn't, unfortunately (I had subsequently figured out where it was
> creeping in from).
>
>
> On 26/03/15 01:27, Sean Silva wrote:
>
> Does the error go away with '-fcolor-diagnostics' instead of
> '-fcolor-diagnosticsoo'? If it does, then maybe '-fcolor-diagnosticsoo'
> is generating an error that is not being handled correctly in the tool.
>
>  -- Sean Silva
>
> On Wed, Mar 25, 2015 at 10:32 AM, Peter Stirling <
> peter at pjstirling.plus.com> wrote:
>
>> Hi,
>>
>> I'm seeing some odd behaviour that I hope someone can suggest a solution
>> for:
>>
>> Recently, when I run my tool on my test file I get errors that I don't
>> get if I run clang++ with equivalent options -
>>
>>
>> In file included from
>> /home/peter/Programming/llvm/llvm/tools/clang/tools/extra/quaff/dummy.cc:6:
>> In file included from /usr/include/taglib/taglib.h:47:
>> In file included from
>> /../lib/gcc/x86_64-redhat-linux/4.9.2/../../../../include/c++/4.9.2/string:40:
>> In file included from
>> /../lib/gcc/x86_64-redhat-linux/4.9.2/../../../../include/c++/4.9.2/bits/char_traits.h:39:
>> In file included from
>> /../lib/gcc/x86_64-redhat-linux/4.9.2/../../../../include/c++/4.9.2/bits/stl_algobase.h:63:
>> /../lib/gcc/x86_64-redhat-linux/4.9.2/../../../../include/c++/4.9.2/ext/numeric_traits.h:58:35:
>> error: invalid operands to binary expression ('float' and 'unsigned long')
>>       static const _Value __min = __glibcxx_min(_Value);
>>                                   ^~~~~~~~~~~~~~~~~~~~~
>> /../lib/gcc/x86_64-redhat-linux/4.9.2/../../../../include/c++/4.9.2/ext/numeric_traits.h:48:35:
>> note: expanded from macro '__glibcxx_min'
>>   (__glibcxx_signed(_Tp) ? (_Tp)1 << __glibcxx_digits(_Tp) : (_Tp)0)
>>                            ~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~
>> /../lib/gcc/x86_64-redhat-linux/4.9.2/../../../../include/c++/4.9.2/ext/numeric_traits.h:55:12:
>> note: in instantiation of template class
>> '__gnu_cxx::__numeric_traits_integer<float>' requested here
>>     struct __numeric_traits_integer
>>            ^
>> /../lib/gcc/x86_64-redhat-linux/4.9.2/../../../../include/c++/4.9.2/ext/numeric_traits.h:59:35:
>> error: invalid operands to binary expression ('float' and 'unsigned long')
>>       static const _Value __max = __glibcxx_max(_Value);
>>                                   ^~~~~~~~~~~~~~~~~~~~~
>> /../lib/gcc/x86_64-redhat-linux/4.9.2/../../../../include/c++/4.9.2/ext/numeric_traits.h:52:15:
>> note: expanded from macro '__glibcxx_max'
>>    (((((_Tp)1 << (__glibcxx_digits(_Tp) - 1)) - 1) << 1) + 1) : ~(_Tp)0)
>>        ~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> /../lib/gcc/x86_64-redhat-linux/4.9.2/../../../../include/c++/4.9.2/ext/numeric_traits.h:58:35:
>> error: invalid operands to binary expression ('double' and 'unsigned long')
>>       static const _Value __min = __glibcxx_min(_Value);
>>                                   ^~~~~~~~~~~~~~~~~~~~~
>> /../lib/gcc/x86_64-redhat-linux/4.9.2/../../../../include/c++/4.9.2/ext/numeric_traits.h:48:35:
>> note: expanded from macro '__glibcxx_min'
>>   (__glibcxx_signed(_Tp) ? (_Tp)1 << __glibcxx_digits(_Tp) : (_Tp)0)
>>                            ~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~
>> /../lib/gcc/x86_64-redhat-linux/4.9.2/../../../../include/c++/4.9.2/ext/numeric_traits.h:55:12:
>> note: in instantiation of template class
>> '__gnu_cxx::__numeric_traits_integer<double>' requested here
>>     struct __numeric_traits_integer
>>            ^
>> /../lib/gcc/x86_64-redhat-linux/4.9.2/../../../../include/c++/4.9.2/ext/numeric_traits.h:59:35:
>> error: invalid operands to binary expression ('double' and 'unsigned long')
>>       static const _Value __max = __glibcxx_max(_Value);
>>                                   ^~~~~~~~~~~~~~~~~~~~~
>> /../lib/gcc/x86_64-redhat-linux/4.9.2/../../../../include/c++/4.9.2/ext/numeric_traits.h:52:15:
>> note: expanded from macro '__glibcxx_max'
>>    (((((_Tp)1 << (__glibcxx_digits(_Tp) - 1)) - 1) << 1) + 1) : ~(_Tp)0)
>>        ~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> /../lib/gcc/x86_64-redhat-linux/4.9.2/../../../../include/c++/4.9.2/ext/numeric_traits.h:58:35:
>> error: invalid operands to binary expression ('long double' and 'unsigned
>> long')
>>       static const _Value __min = __glibcxx_min(_Value);
>>                                   ^~~~~~~~~~~~~~~~~~~~~
>> /../lib/gcc/x86_64-redhat-linux/4.9.2/../../../../include/c++/4.9.2/ext/numeric_traits.h:48:35:
>> note: expanded from macro '__glibcxx_min'
>>   (__glibcxx_signed(_Tp) ? (_Tp)1 << __glibcxx_digits(_Tp) : (_Tp)0)
>>                            ~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~
>> /../lib/gcc/x86_64-redhat-linux/4.9.2/../../../../include/c++/4.9.2/ext/numeric_traits.h:55:12:
>> note: in instantiation of template class
>> '__gnu_cxx::__numeric_traits_integer<long double>' requested here
>>     struct __numeric_traits_integer
>>            ^
>> /../lib/gcc/x86_64-redhat-linux/4.9.2/../../../../include/c++/4.9.2/ext/numeric_traits.h:59:35:
>> error: invalid operands to binary expression ('long double' and 'unsigned
>> long')
>>       static const _Value __max = __glibcxx_max(_Value);
>>                                   ^~~~~~~~~~~~~~~~~~~~~
>> /../lib/gcc/x86_64-redhat-linux/4.9.2/../../../../include/c++/4.9.2/ext/numeric_traits.h:52:15:
>> note: expanded from macro '__glibcxx_max'
>>    (((((_Tp)1 << (__glibcxx_digits(_Tp) - 1)) - 1) << 1) + 1) : ~(_Tp)0)
>>        ~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>> I extracted the command line produced by the FixedCompilationDatabase and
>> printed it with quotes for extra paranoia:
>>
>> 'clang-tool' '-Wall' '-std=c++11' '-fcolor-diagnosticsoo'
>> '/home/peter/Programming/llvm/llvm/tools/clang/tools/extra/quaff/dummy.cc'
>>
>> First thing to observe is that -fcolor-diagnosticsoo seems a bit weird.
>> Second is that running clang++ -Wall -std=c++11
>> /home/peter/Programming/llvm/llvm/tools/clang/tools/extra/quaff/dummy.cc
>> doesn't error.
>>
>> This is on a fedora box, if that makes a difference.
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150325/a1cffaa4/attachment.html>


More information about the cfe-dev mailing list