Bug 87405 - Implement -Wliteral-conversion
Summary: Implement -Wliteral-conversion
Status: RESOLVED DUPLICATE of bug 55077
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 9.0
: P3 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: diagnostic
Depends on:
Blocks: new-warning, new_warning
  Show dependency treegraph
 
Reported: 2018-09-24 10:36 UTC by Martin Liška
Modified: 2022-02-04 08:15 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2018-09-24 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Liška 2018-09-24 10:36:03 UTC
Also coming from LLVM, it found a real issue in GCC:

gcc/ipa-fnsummary.c:2745:54:Value Conversion Issue: implicit conversion from 'double' to 'int64_t' (aka 'long') changes value from 0.99 to 0: -Wliteral-conversion

I would consider adding that to GCC as well.
Comment 1 Andrew Pinski 2018-09-24 11:07:29 UTC
.
Comment 2 Eric Gallager 2018-09-30 00:53:41 UTC
Dup of bug 55077

*** This bug has been marked as a duplicate of bug 55077 ***