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: [email protected]
          Reporter: [email protected]
                CC: [email protected]

$ 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.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to