[Bug c++/82745] Fails to warn on narrowing conversion by std::forward (e.g. when calling make_unique)

2017-10-28 Thread helge at penne dot no
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82745 --- Comment #8 from helge at penne dot no --- (In reply to Jonathan Wakely from comment #7) > -Wsystem-headers is needed to get the warnings when the conversion happens > in code inside a system-header (which is the case for lots of standard >

[Bug c++/82745] Fails to warn on narrowing conversion by std::forward (e.g. when calling make_unique)

2017-10-28 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82745 --- Comment #7 from Jonathan Wakely --- Please read my answer again: (In reply to Jonathan Wakely from comment #5) > This is the same issue as PR 58876, namely that the problem happens inside a > system header, so the diagnostics are suppressed

[Bug c++/82745] Fails to warn on narrowing conversion by std::forward (e.g. when calling make_unique)

2017-10-28 Thread helge at penne dot no
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82745 --- Comment #6 from helge at penne dot no --- I'm sorry if I confused you by using the wrong terminology here. My bad. We're now getting to the real issue, and that's great. You're right that C++ by default allows implicit conversion that

[Bug c++/82745] Fails to warn on narrowing conversion by std::forward (e.g. when calling make_unique)

2017-10-27 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82745 --- Comment #5 from Jonathan Wakely --- (In reply to helge from comment #4) > (In reply to Jonathan Wakely from comment #2) > > Narrowing conversions only cause a diagnostic in braced-init-list, not in > > other contexts. This is how C++ has

[Bug c++/82745] Fails to warn on narrowing conversion by std::forward (e.g. when calling make_unique)

2017-10-27 Thread helge at penne dot no
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82745 --- Comment #4 from helge at penne dot no --- (In reply to Jonathan Wakely from comment #2) > Narrowing conversions only cause a diagnostic in braced-init-list, not in > other contexts. This is how C++ has worked since day one. I must admit that

[Bug c++/82745] Fails to warn on narrowing conversion by std::forward (e.g. when calling make_unique)

2017-10-27 Thread daniel.kruegler at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82745 Daniel Krügler changed: What|Removed |Added CC||daniel.kruegler@googlemail.

[Bug c++/82745] Fails to warn on narrowing conversion by std::forward (e.g. when calling make_unique)

2017-10-27 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82745 --- Comment #2 from Jonathan Wakely --- Narrowing conversions only cause a diagnostic in braced-init-list, not in other contexts. This is how C++ has worked since day one.

[Bug c++/82745] Fails to warn on narrowing conversion by std::forward (e.g. when calling make_unique)

2017-10-27 Thread helge at penne dot no
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82745 helge at penne dot no changed: What|Removed |Added Summary|Fails to warn on narrowing |Fails to warn on narrowing