[LLVMbugs] [Bug 20403] New: Thread Safety Analysis "guarded_by" attribute doesn't work for struct fields in C code
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Jul 22 14:57:11 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=20403
Bug ID: 20403
Summary: Thread Safety Analysis "guarded_by" attribute doesn't
work for struct fields in C code
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: matthew at dempsky.org
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
$ cat demo.c
struct mutex {
int x;
};
struct guarded_int {
struct mutex mu;
int value __attribute__((guarded_by(mu)));
};
$ clang -c demo.c
demo.c:7:38: error: use of undeclared identifier 'mu'
int value __attribute__((guarded_by(mu)));
^
1 error generated.
Clang compiles the code okay with "-x c++", so it seems to be a bug in how
Thread Safety Analysis is wired into the C frontend.
--
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/20140722/f62c43f8/attachment.html>
More information about the llvm-bugs
mailing list