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
[
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80544
Jonathan Wakely changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80544
Jonathan Wakely changed:
What|Removed |Added
See Also||https://gcc.gnu.org/bugzill
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80544
Jonathan Wakely changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|