[llvm-bugs] [Bug 28440] New: Clang prints illegal initializer type '_Atomic(unsigned long long)' for valid code

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jul 6 15:30:21 PDT 2016


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

            Bug ID: 28440
           Summary: Clang prints illegal initializer type
                    '_Atomic(unsigned long long)' for valid code
           Product: clang
           Version: 3.7
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: clockley1 at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Test case: https://gist.github.com/clockley/eb42964003a2e4fe6de97d5b192d61d3

Error message:
main.c:1:40: error: illegal initializer type '_Atomic(unsigned long long)'
static _Atomic(unsigned long long) i = {0};
                                       ^
1 error generated.

Expected result: code compiles without errors.

Why: "The initializer for a scalar shall be a single expression, optionally
enclosed in braces." --
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf

-- 
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/20160706/71c54373/attachment.html>


More information about the llvm-bugs mailing list