[llvm-bugs] [Bug 39690] New: _Atomic array parameters

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Nov 16 07:06:55 PST 2018


            Bug ID: 39690
           Summary: _Atomic array parameters
           Product: clang
           Version: 6.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: jens.gustedt at inria.fr
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

The C standard allows any qualification inside the first array dimension of an
array parameter. The following code is correct C

_Atomic(void (*)(void)) a;
double e(double A[const static 1]){
  double *const* a = &A;
  return **a;
double f(double A[_Atomic static 1]){
  double *_Atomic* a = &A;
  return **a;

but gets a warning from clang 6.0 for f but none for e.

gcc compiles this without any diagnostic as it should.



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/20181116/1fcbb594/attachment.html>

More information about the llvm-bugs mailing list