https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86218
Bug 86218 depends on bug 78244, which changed state.
Bug 78244 Summary: Narrowing conversion is accepted in a function template, but
it should be rejected
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78244
What|Removed
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86218
Alexandre Oliva changed:
What|Removed |Added
Status|ASSIGNED|RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86218
--- Comment #6 from Alexandre Oliva ---
Author: aoliva
Date: Thu Feb 7 07:50:42 2019
New Revision: 268606
URL: https://gcc.gnu.org/viewcvs?rev=268606=gcc=rev
Log:
[PR86218] handle ck_aggr in compare_ics in both and either conversion
Because
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86218
--- Comment #5 from Alexandre Oliva ---
https://gcc.gnu.org/ml/gcc-patches/2019-01/msg01731.html
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86218
Alexandre Oliva changed:
What|Removed |Added
Status|NEW |ASSIGNED
CC|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86218
Richard Biener changed:
What|Removed |Added
Priority|P3 |P2
Depends on|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86218
--- Comment #3 from Marek Polacek ---
Which I guess is Bug 78244.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86218
--- Comment #2 from Marek Polacek ---
Is this really valid though?
clang++ says
86218.C:8:7: error: type 'double' cannot be narrowed to 'char' in initializer
list [-Wc++11-narrowing]
and if I use
f ({static_cast(2.0)});
then g++ compiles it
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86218
Marek Polacek changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|