https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78244
Andrew Pinski changed:
What|Removed |Added
Target Milestone|--- |11.0
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78244
Marek Polacek changed:
What|Removed |Added
Status|ASSIGNED|RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78244
--- Comment #15 from CVS Commits ---
The trunk branch has been updated by Marek Polacek :
https://gcc.gnu.org/g:19c62569ccf20d2744b63482a470474391d28c02
commit r13-44-g19c62569ccf20d2744b63482a470474391d28c02
Author: Marek Polacek
Date: Fri
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78244
Patrick Palka changed:
What|Removed |Added
CC||ppalka at gcc dot gnu.org
See
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78244
Andrew Pinski changed:
What|Removed |Added
CC||msebor at gcc dot gnu.org
--- Comment #1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78244
--- Comment #12 from Marek Polacek ---
Another bit to extend the Comment 11 test:
// Test OVERLOAD in a template.
int id(int v) { return v; }
double id(double v) { return v; }
template
auto f5(double v) -> decltype((S{id(v)}, 1)) { return 1; }
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78244
--- Comment #11 from Marek Polacek ---
What still remains to be fixed is:
// PR c++/78244
// { dg-do compile { target c++11 } }
struct S { S(int); int d; };
template
auto f1() -> decltype(S{2.0}, void()) { } // { dg-error "narrowing conversio
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78244
--- Comment #10 from Marek Polacek ---
Author: mpolacek
Date: Sun Jan 27 20:19:41 2019
New Revision: 268321
URL: https://gcc.gnu.org/viewcvs?rev=268321&root=gcc&view=rev
Log:
PR c++/88815 - narrowing conversion lost in decltype.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78244
--- Comment #9 from Marek Polacek ---
Author: mpolacek
Date: Wed Jan 16 15:58:34 2019
New Revision: 267976
URL: https://gcc.gnu.org/viewcvs?rev=267976&root=gcc&view=rev
Log:
PR c++/78244 - narrowing conversion in template not detected.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78244
--- Comment #8 from Marek Polacek ---
Testcase from 88012:
using Number = unsigned int;
template
struct S {
S() {
const Number x = {-1};
(void)x;
}
};
int main()
{
S<1> s;
}
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78244
Marek Polacek changed:
What|Removed |Added
CC||vz-gcc at zeitlins dot org
--- Comment #
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78244
Jakub Jelinek changed:
What|Removed |Added
CC||jakub at gcc dot gnu.org
--- Comment #6
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78244
--- Comment #5 from Marek Polacek ---
And with class templates:
template
struct S {
static const int i{1.1};
};
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78244
--- Comment #4 from Marek Polacek ---
Another simple test:
template
decltype(int{1.1}) v;
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78244
--- Comment #3 from Marek Polacek ---
Enhanced testcase (so that I don't lose it):
template
auto f1(T) -> decltype(int{2.0}, void()) { }
template
auto f2(T) -> decltype(int{2.0}) { return 1; }
template
auto f3(T) -> decltype(void(), int{2.0
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78244
Marek Polacek changed:
What|Removed |Added
Status|NEW |ASSIGNED
CC|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78244
Jonathan Wakely changed:
What|Removed |Added
Last reconfirmed|2016-11-08 00:00:00 |2018-6-20
See Also|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78244
Martin Liška changed:
What|Removed |Added
Keywords||accepts-invalid
Status|UNCONF
18 matches
Mail list logo