<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi,<br>
When compiling the following test program on my Ubuntu machine, I get a compile-time error:<br>
<br>
/* test.c */<br>
#if __has_feature(c_static_assert)<br>
#pragma message("HAS_STATIC_ASSERT")<br>
#else<br>
_Static_assert(1==0,"");  // if there is no static assert support<br>
#endif<br>
/* end of test.c */<br>
<br>
$ install/bin/clang -S -o - test.c<br>
test.c:4:1: error: static_assert failed ""<br>
_Static_assert(1==0,"");<br>
^              ~~~~<br>
1 error generated.<br>
<br>
Since __has_feature(c_static_assert) is false, I would not expect _Static_assert() to be enabled here. Should I file a clang bug?<br>
<br>
Thanks,<br>
- Gao.<br>
</div>
</body>
</html>