[Bug c++/78244] Narrowing conversion is accepted in a function template, but it should be rejected

2022-10-31 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78244 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |11.0

[Bug c++/78244] Narrowing conversion is accepted in a function template, but it should be rejected

2022-04-29 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78244 Marek Polacek changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug c++/78244] Narrowing conversion is accepted in a function template, but it should be rejected

2022-04-29 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
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

[Bug c++/78244] Narrowing conversion is accepted in a function template, but it should be rejected

2022-03-07 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78244 Patrick Palka changed: What|Removed |Added CC||ppalka at gcc dot gnu.org See

[Bug c++/78244] Narrowing conversion is accepted in a function template, but it should be rejected

2021-09-16 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78244 Andrew Pinski changed: What|Removed |Added CC||msebor at gcc dot gnu.org --- Comment

[Bug c++/78244] Narrowing conversion is accepted in a function template, but it should be rejected

2019-10-26 Thread mpolacek at gcc dot gnu.org
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;

[Bug c++/78244] Narrowing conversion is accepted in a function template, but it should be rejected

2019-01-27 Thread mpolacek at gcc dot gnu.org
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

[Bug c++/78244] Narrowing conversion is accepted in a function template, but it should be rejected

2019-01-27 Thread mpolacek at gcc dot gnu.org
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=gcc=rev Log: PR c++/88815 - narrowing conversion lost in decltype. PR

[Bug c++/78244] Narrowing conversion is accepted in a function template, but it should be rejected

2019-01-16 Thread mpolacek at gcc dot gnu.org
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=gcc=rev Log: PR c++/78244 - narrowing conversion in template not detected. *

[Bug c++/78244] Narrowing conversion is accepted in a function template, but it should be rejected

2018-11-13 Thread mpolacek at gcc dot gnu.org
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; }

[Bug c++/78244] Narrowing conversion is accepted in a function template, but it should be rejected

2018-11-13 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78244 Marek Polacek changed: What|Removed |Added CC||vz-gcc at zeitlins dot org --- Comment

[Bug c++/78244] Narrowing conversion is accepted in a function template, but it should be rejected

2018-11-13 Thread jakub at gcc dot gnu.org
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

[Bug c++/78244] Narrowing conversion is accepted in a function template, but it should be rejected

2018-08-14 Thread mpolacek at gcc dot gnu.org
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}; };

[Bug c++/78244] Narrowing conversion is accepted in a function template, but it should be rejected

2018-08-14 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78244 --- Comment #4 from Marek Polacek --- Another simple test: template decltype(int{1.1}) v;

[Bug c++/78244] Narrowing conversion is accepted in a function template, but it should be rejected

2018-08-14 Thread mpolacek at gcc dot gnu.org
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(),

[Bug c++/78244] Narrowing conversion is accepted in a function template, but it should be rejected

2018-06-27 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78244 Marek Polacek changed: What|Removed |Added Status|NEW |ASSIGNED CC|

[Bug c++/78244] Narrowing conversion is accepted in a function template, but it should be rejected

2018-06-20 Thread redi at gcc dot gnu.org
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|

[Bug c++/78244] Narrowing conversion is accepted in a function template, but it should be rejected

2016-11-08 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78244 Martin Liška changed: What|Removed |Added Keywords||accepts-invalid