https://llvm.org/bugs/show_bug.cgi?id=26672
Bug ID: 26672 Summary: [ms] Clang does not recognize "static_assert" keyword in C mode Product: clang Version: trunk Hardware: PC OS: Windows NT Status: NEW Severity: normal Priority: P Component: Frontend Assignee: unassignedclangb...@nondot.org Reporter: andrey.kules...@intel.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified !- "static_assert" keyword is not described in C standard, but Microsoft visual compiler (cl) can compile C code with this keyword, it seems that it might be added to clang in C mode as well -! =========Environment============ Os: Windows Language: C Version of clang: trunk ========How to reproduce======== $ cat test.c static_assert(1, "in the ifdef"); $ clang -c test.c ========Error================== >>>clang: ---- test.c:1:15: error: expected parameter declarator static_assert(1, "in the ifdef"); ^ test.c:1:15: error: expected ')' test.c:1:14: note: to match this '(' static_assert(1, "in the ifdef"); ^ test.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] static_assert(1, "in the ifdef"); ^ >>>MSVC Version 18.00.31101 for x64: ---- no diagnostics >>> Intel c/c++ compiler: ---- no diagnostics ======================= Intel Software Engineer Andrey Kuleshov -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs