http://llvm.org/bugs/show_bug.cgi?id=8143
Summary: #pragma diagnostic ignored is not honoured by template
code
Product: clang
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Created an attachment (id=5488)
--> (http://llvm.org/bugs/attachment.cgi?id=5488)
self-contained snippet reproducing the bug
~> clang --version
clang version 2.9 (trunk 113485)
Target: x86_64-apple-darwin10
Thread model: posix
~> make
clang++ -c -o main.o main.cpp
In file included from main.cpp:1:
./warning.hpp:6:9: warning: comparison of unsigned expression < 0 is always
false
[-Wtautological-compare]
if (x < T(0)) return -x;
~ ^ ~~~~
main.cpp:5:16: note: in instantiation of function template specialization
'absolute<unsigned int>'
requested here
std::cout << absolute(1u) << absolute_unsigned(1u) << std::endl;
^
1 warning generated.
Thus "#pragma diagnostic ignored" is actually ignored by templated code.
C.f. thread
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2010-September/010884.html
--
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs