<div dir="ltr">I'm guessing LLVM doesn't build by default with -Wpedantic - and you added that to your compiler flags for your build?<br><br>While I wouldn't be averse to these being fixed, it might not be a high priority for anyone if this sort of thing works on all the supported compilers, I'm not sure. (maybe CC the people who last touched/wrote the code to bring this to their attention - sometimes not everyone catches everything on the mailing lists)</div><br><div class="gmail_quote"><div dir="ltr">On Thu, Jun 8, 2017 at 3:50 AM Csaba Raduly via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">~/workspace/LLVM/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_report.cc:<br>
In function ‘const char* __tsan::ReportTypeString(__tsan::ReportType,<br>
__sanitizer::uptr)’:<br>
~/workspace/LLVM/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_report.cc:95:41:<br>
warning: ISO C++ does not allow ?: with omitted middle operand<br>
[-Wpedantic]<br>
     return GetReportHeaderFromTag(tag) ?: "race on external object";<br>
                                         ^<br>
~/workspace/LLVM/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_report.cc:95:43:<br>
warning: ISO C++ forbids omitting the middle term of a ?: expression<br>
[-Wpedantic]<br>
     return GetReportHeaderFromTag(tag) ?: "race on external object";<br>
                                           ^<br>
~/workspace/LLVM/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_report.cc:<br>
In function ‘void __tsan::PrintMop(const __tsan::ReportMop*, bool)’:<br>
~/workspace/LLVM/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_report.cc:174:50:<br>
warning: ISO C++ does not allow ?: with omitted middle operand<br>
[-Wpedantic]<br>
         GetObjectTypeFromTag(mop->external_tag) ?: "external object";<br>
                                                  ^<br>
~/workspace/LLVM/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_report.cc:174:52:<br>
warning: ISO C++ forbids omitting the middle term of a ?: expression<br>
[-Wpedantic]<br>
         GetObjectTypeFromTag(mop->external_tag) ?: "external object";<br>
<br>
This usage is a GCC extension and is likely not portable to other<br>
compilers (even if clang also accepts it).<br>
<br>
Csaba<br>
--<br>
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++<br>
The Tao of math: The numbers you can count are not the real numbers.<br>
Life is complex, with real and imaginary parts.<br>
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds<br>
"People disagree with me. I just ignore them." -- Linus Torvalds<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>