<div dir="ltr">Does the error go away with '-fcolor-diagnostics' instead of <span style="font-size:13px">'-fcolor-diagnosticsoo'?</span> If it does, then maybe <span style="font-size:13px">'-fcolor-diagnosticsoo' is generating an error that is not being handled correctly in the tool.</span><div><span style="font-size:13px"><br></span></div><div><span style="font-size:13px">-- Sean Silva</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 25, 2015 at 10:32 AM, Peter Stirling <span dir="ltr"><<a href="mailto:peter@pjstirling.plus.com" target="_blank">peter@pjstirling.plus.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I'm seeing some odd behaviour that I hope someone can suggest a solution for:<br>
<br>
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 -<br>
<br>
<br>
In file included from /home/peter/Programming/llvm/<u></u>llvm/tools/clang/tools/extra/<u></u>quaff/dummy.cc:6:<br>
In file included from /usr/include/taglib/taglib.h:<u></u>47:<br>
In file included from /../lib/gcc/x86_64-redhat-<u></u>linux/4.9.2/../../../../<u></u>include/c++/4.9.2/string:40:<br>
In file included from /../lib/gcc/x86_64-redhat-<u></u>linux/4.9.2/../../../../<u></u>include/c++/4.9.2/bits/char_<u></u>traits.h:39:<br>
In file included from /../lib/gcc/x86_64-redhat-<u></u>linux/4.9.2/../../../../<u></u>include/c++/4.9.2/bits/stl_<u></u>algobase.h:63:<br>
/../lib/gcc/x86_64-redhat-<u></u>linux/4.9.2/../../../../<u></u>include/c++/4.9.2/ext/numeric_<u></u>traits.h:58:35: error: invalid operands to binary expression ('float' and 'unsigned long')<br>
      static const _Value __min = __glibcxx_min(_Value);<br>
                                  ^~~~~~~~~~~~~~~~~~~~~<br>
/../lib/gcc/x86_64-redhat-<u></u>linux/4.9.2/../../../../<u></u>include/c++/4.9.2/ext/numeric_<u></u>traits.h:48:35: note: expanded from macro '__glibcxx_min'<br>
  (__glibcxx_signed(_Tp) ? (_Tp)1 << __glibcxx_digits(_Tp) : (_Tp)0)<br>
                           ~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~<br>
/../lib/gcc/x86_64-redhat-<u></u>linux/4.9.2/../../../../<u></u>include/c++/4.9.2/ext/numeric_<u></u>traits.h:55:12: note: in instantiation of template class '__gnu_cxx::__numeric_traits_<u></u>integer<float>' requested here<br>
    struct __numeric_traits_integer<br>
           ^<br>
/../lib/gcc/x86_64-redhat-<u></u>linux/4.9.2/../../../../<u></u>include/c++/4.9.2/ext/numeric_<u></u>traits.h:59:35: error: invalid operands to binary expression ('float' and 'unsigned long')<br>
      static const _Value __max = __glibcxx_max(_Value);<br>
                                  ^~~~~~~~~~~~~~~~~~~~~<br>
/../lib/gcc/x86_64-redhat-<u></u>linux/4.9.2/../../../../<u></u>include/c++/4.9.2/ext/numeric_<u></u>traits.h:52:15: note: expanded from macro '__glibcxx_max'<br>
   (((((_Tp)1 << (__glibcxx_digits(_Tp) - 1)) - 1) << 1) + 1) : ~(_Tp)0)<br>
       ~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
/../lib/gcc/x86_64-redhat-<u></u>linux/4.9.2/../../../../<u></u>include/c++/4.9.2/ext/numeric_<u></u>traits.h:58:35: error: invalid operands to binary expression ('double' and 'unsigned long')<br>
      static const _Value __min = __glibcxx_min(_Value);<br>
                                  ^~~~~~~~~~~~~~~~~~~~~<br>
/../lib/gcc/x86_64-redhat-<u></u>linux/4.9.2/../../../../<u></u>include/c++/4.9.2/ext/numeric_<u></u>traits.h:48:35: note: expanded from macro '__glibcxx_min'<br>
  (__glibcxx_signed(_Tp) ? (_Tp)1 << __glibcxx_digits(_Tp) : (_Tp)0)<br>
                           ~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~<br>
/../lib/gcc/x86_64-redhat-<u></u>linux/4.9.2/../../../../<u></u>include/c++/4.9.2/ext/numeric_<u></u>traits.h:55:12: note: in instantiation of template class '__gnu_cxx::__numeric_traits_<u></u>integer<double>' requested here<br>
    struct __numeric_traits_integer<br>
           ^<br>
/../lib/gcc/x86_64-redhat-<u></u>linux/4.9.2/../../../../<u></u>include/c++/4.9.2/ext/numeric_<u></u>traits.h:59:35: error: invalid operands to binary expression ('double' and 'unsigned long')<br>
      static const _Value __max = __glibcxx_max(_Value);<br>
                                  ^~~~~~~~~~~~~~~~~~~~~<br>
/../lib/gcc/x86_64-redhat-<u></u>linux/4.9.2/../../../../<u></u>include/c++/4.9.2/ext/numeric_<u></u>traits.h:52:15: note: expanded from macro '__glibcxx_max'<br>
   (((((_Tp)1 << (__glibcxx_digits(_Tp) - 1)) - 1) << 1) + 1) : ~(_Tp)0)<br>
       ~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
/../lib/gcc/x86_64-redhat-<u></u>linux/4.9.2/../../../../<u></u>include/c++/4.9.2/ext/numeric_<u></u>traits.h:58:35: error: invalid operands to binary expression ('long double' and 'unsigned long')<br>
      static const _Value __min = __glibcxx_min(_Value);<br>
                                  ^~~~~~~~~~~~~~~~~~~~~<br>
/../lib/gcc/x86_64-redhat-<u></u>linux/4.9.2/../../../../<u></u>include/c++/4.9.2/ext/numeric_<u></u>traits.h:48:35: note: expanded from macro '__glibcxx_min'<br>
  (__glibcxx_signed(_Tp) ? (_Tp)1 << __glibcxx_digits(_Tp) : (_Tp)0)<br>
                           ~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~<br>
/../lib/gcc/x86_64-redhat-<u></u>linux/4.9.2/../../../../<u></u>include/c++/4.9.2/ext/numeric_<u></u>traits.h:55:12: note: in instantiation of template class '__gnu_cxx::__numeric_traits_<u></u>integer<long double>' requested here<br>
    struct __numeric_traits_integer<br>
           ^<br>
/../lib/gcc/x86_64-redhat-<u></u>linux/4.9.2/../../../../<u></u>include/c++/4.9.2/ext/numeric_<u></u>traits.h:59:35: error: invalid operands to binary expression ('long double' and 'unsigned long')<br>
      static const _Value __max = __glibcxx_max(_Value);<br>
                                  ^~~~~~~~~~~~~~~~~~~~~<br>
/../lib/gcc/x86_64-redhat-<u></u>linux/4.9.2/../../../../<u></u>include/c++/4.9.2/ext/numeric_<u></u>traits.h:52:15: note: expanded from macro '__glibcxx_max'<br>
   (((((_Tp)1 << (__glibcxx_digits(_Tp) - 1)) - 1) << 1) + 1) : ~(_Tp)0)<br>
       ~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
<br>
I extracted the command line produced by the FixedCompilationDatabase and printed it with quotes for extra paranoia:<br>
<br>
'clang-tool' '-Wall' '-std=c++11' '-fcolor-diagnosticsoo' '/home/peter/Programming/llvm/<u></u>llvm/tools/clang/tools/extra/<u></u>quaff/dummy.cc'<br>
<br>
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/<u></u>llvm/tools/clang/tools/extra/<u></u>quaff/dummy.cc doesn't error.<br>
<br>
This is on a fedora box, if that makes a difference.<br>
______________________________<u></u>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br></div>