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

            Bug ID: 27061
           Summary: -Wfloat-conversion doesn't catch "int += double"
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

The following code compiles cleanly with clang with '-Weverything':

--------------------
int main()
{
    int x = 3;
    x += 1.234;
    return x;
}
--------------------

It is expected to issue a -Wfloat-conversion warning. For example, gcc 4.9
gives:
--------------------
tmp.cc: In function 'int main()':
tmp.cc:4:7: warning: conversion to 'int' from 'double' may alter its value
[-Wfloat-conversion]
     x += 1.234;
--------------------

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to