[llvm-bugs] [Bug 38593] New: -Watomic-alignment too eager?

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Aug 16 01:39:41 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=38593

            Bug ID: 38593
           Summary: -Watomic-alignment too eager?
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: mh+llvm at glandium.org
                CC: llvm-bugs at lists.llvm.org

$ cat <<EOF > test.c
#include <stdint.h>

uint64_t
loadSeqCst(uint64_t* addr) {
  uint64_t v;
  __atomic_load(addr, &v, __ATOMIC_SEQ_CST);
  return v;
}
EOF
$ clang-7 -o test.o -c test.c -m32
test.c:6:3: warning: misaligned or large atomic operation may incur significant
performance penalty [-Watomic-alignment]
  __atomic_load(addr, &v, __ATOMIC_SEQ_CST);
  ^
1 warning generated.

This seems too eager for a warning that is emitted without even passing a
-Wsomething on the command line.

-- 
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/20180816/9faa58a6/attachment.html>


More information about the llvm-bugs mailing list