[llvm-bugs] [Bug 42295] New: _Static_assert(.1 == .1, ""); won't compile

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jun 17 00:14:47 PDT 2019


            Bug ID: 42295
           Summary: _Static_assert(.1 == .1, ""); won't compile
           Product: clang
           Version: 8.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C
          Assignee: unassignedclangbugs at nondot.org
          Reporter: zjz at zjz.name
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

When compiling any of the following lines,
_Static_assert(.1 == .1, "");
_Static_assert(.2 > .1, "");
_Static_assert(.1 > .2, "");

Clang will throw an error: static_assert expression is not an integral constant

But the above expression yields int values, so they should compile.

Test on GCC 7.3 passes those lines.

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/20190617/e0c54176/attachment.html>

More information about the llvm-bugs mailing list