[llvm-bugs] [Bug 46795] New: isless( int, float ) not caught with -pedantic-errors

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jul 21 15:14:55 PDT 2020


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

            Bug ID: 46795
           Summary: isless( int, float ) not caught with -pedantic-errors
           Product: clang
           Version: 10.0
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C
          Assignee: unassignedclangbugs at nondot.org
          Reporter: tydeman at tybor.com
                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

Using clang 10.0.0 on ARM (and I believe Intel x86) with -std-c2x
-pedantic-errors is not flagging invalid code that uses any of the comparison
operators (isless, islessequal, isgreater, isgreaterequal, ...) along with an
argument that is not a real floating type.
The C standard, since C99, has the requirement:  In the synopses in this
subclause [Comparison macros], real-floating indicates that the argument shall
be an expression of real floating type.  There is not even a warning.

-- 
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/20200721/d133cbf5/attachment.html>


More information about the llvm-bugs mailing list