[Bug c++/80544] result of const_cast should by cv-unqualified

2017-05-24 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80544 --- Comment #6 from Jonathan Wakely --- GCC now accepts the original testcase, and with -Wignored-qualifiers (which is included in -Wextra) prints: q.cc: In function ‘int main()’: q.cc:8:30: warning: type qualifiers ignored on cast result type [

[Bug c++/80544] result of const_cast should by cv-unqualified

2017-05-24 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80544 Jonathan Wakely changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug c++/80544] result of const_cast should by cv-unqualified

2017-05-24 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80544 --- Comment #4 from Jonathan Wakely --- Author: redi Date: Wed May 24 22:16:59 2017 New Revision: 248432 URL: https://gcc.gnu.org/viewcvs?rev=248432&root=gcc&view=rev Log: PR c++/80544 strip cv-quals from cast results gcc/cp: PR c++/80

[Bug c++/80544] result of const_cast should by cv-unqualified

2017-04-27 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80544 Jonathan Wakely changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug c++/80544] result of const_cast should by cv-unqualified

2017-04-27 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80544 --- Comment #2 from Jonathan Wakely --- And also reinterpret_cast: template struct check { }; template struct check; template check f(T&&) { return {}; } template T val() { return {}; } int main() { int i; f(static_cast(&i)); f(const_ca

[Bug c++/80544] result of const_cast should by cv-unqualified

2017-04-27 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80544 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|