[llvm-bugs] [Bug 44064] New: Missing warning for comparison with string literals (expanded from macro)
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Nov 19 08:18:40 PST 2019
https://bugs.llvm.org/show_bug.cgi?id=44064
Bug ID: 44064
Summary: Missing warning for comparison with string literals
(expanded from macro)
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C
Assignee: unassignedclangbugs at nondot.org
Reporter: david.bolvansky at gmail.com
CC: blitzrakete at gmail.com, dgregor at apple.com,
erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
richard-llvm at metafoo.co.uk
#define PATH_DELIMITER "/"
int foo() {
return PATH_DELIMITER != "/";
}
int foo2() {
return "/" != "/";
}
Clang warns only for foo2, GCC for both and GCC caught a real bug.
I suspect this is just a missing diagnostic... or?
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20191119/a140c3c3/attachment-0001.html>
More information about the llvm-bugs
mailing list