[llvm-bugs] [Bug 39820] New: -Wfloat-conversion error message formatting error
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Nov 28 03:07:16 PST 2018
https://bugs.llvm.org/show_bug.cgi?id=39820
Bug ID: 39820
Summary: -Wfloat-conversion error message formatting error
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: jyrki.havia at helsinki.fi
CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
richard-llvm at metafoo.co.uk
Given code
[havia at villikani colld]$ cat k.c
int main(void)
{
double a = 3.0;
long b = 2;
b /= a;
return 0;
}
[havia at villikani colld]$ clang-8 -Weverything k.c
k.c:6:4: warning: implicit conversion turns floating-point number into integer:
'long' to 'double' [-Wfloat-conversion]
b /= a;
~~^~~~
1 warning generated.
Shouldn't the end of the message be
"'double' to 'long'" instead of "'long' to 'double'"?
clang-8 is localy compiled
[havia at villikani colld]$ clang-8 -v
clang version 8.0.0 (trunk 345705)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/llvm/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.2
Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.5
Selected GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.5
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64
The environment is
[havia at villikani colld]$ lsb_release
LSB Version:
:core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
[havia at villikani colld]$ cat /etc/redhat-release
CentOS Linux release 7.5.1804 (Core)
[havia at villikani colld]$
--
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/20181128/abe1bb72/attachment.html>
More information about the llvm-bugs
mailing list