[llvm-bugs] [Bug 26672] New: [ms] Clang does not recognize "static_assert" keyword in C mode
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Feb 19 04:53:49 PST 2016
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: unassignedclangbugs at nondot.org
Reporter: andrey.kuleshov at intel.com
CC: llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160219/30d704ed/attachment.html>
More information about the llvm-bugs
mailing list