[Bug c/81631] -Wcast-qual false positive for pointer to array

2017-09-14 Thread gcc17 at cwde dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81631 --- Comment #3 from Tobias Jordan --- Hi, thanks for taking a look, and thanks for your explanation. As far as I understand it, it's somewhat intuitive that the qualifiers apply to array elements and not the array type itself. What bugs me is th

[Bug c/81631] -Wcast-qual false positive for pointer to array

2017-09-13 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81631 --- Comment #2 from Marek Polacek --- This is void baz (const int *y) { const int (*x)[6]; x = (const int (*)[6]) y; } ISO C11 says "If the specification of an array type includes any type qualifiers, the element type is so-qualified, not the

[Bug c/81631] -Wcast-qual false positive for pointer to array

2017-09-11 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81631 Martin Liška changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|