[llvm-bugs] [Bug 24451] New: Valid Code Is Rejected

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Aug 13 13:11:23 PDT 2015


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

            Bug ID: 24451
           Summary: Valid Code Is Rejected
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: chengniansun at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

I think the following code is valid, but clang rejects it. Please kindly advise
if I am wrong. Thanks. 



$: cat t.c
#include <stdint.h>
#include <stdatomic.h>
char (*restrict _Atomic a) = "hello";

$: clang-trunk -c t.c
t.c:3:7: error: restrict requires a pointer or reference
('_Atomic(char (*))' is invalid)
char (*restrict _Atomic a) = "hello";
      ^
1 error generated.
$: gcc-trunk -c t.c
$:

-- 
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/20150813/c27d8d37/attachment.html>


More information about the llvm-bugs mailing list