[Bug c++/97432] Casting away constness in the drafts [conv.qual] a cv-decomposition exists in the following examples but fails in gcc

2020-10-15 Thread peifeng2005 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97432 --- Comment #2 from Ray Zhang --- Hi, I actually spoke with Richard Smith about the same ticket (since clang was also involved in the comparison here), and I found that if we were conforming to the draft, the first case should also fail to compil

[Bug c++/97432] Casting away constness in the drafts [conv.qual] a cv-decomposition exists in the following examples but fails in gcc

2020-10-14 Thread peifeng2005 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97432 --- Comment #1 from Ray Zhang --- Providing more context with the first example (also applies for the rest): 1) // pointer to array - works in clang (trunk), // works in gcc (trunk) reinterpret_cast(x); T1: const pointer to const point

[Bug c++/97432] New: Casting away constness in the drafts [conv.qual] a cv-decomposition exists in the following examples but fails in gcc

2020-10-14 Thread peifeng2005 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97432 Bug ID: 97432 Summary: Casting away constness in the drafts [conv.qual] a cv-decomposition exists in the following examples but fails in gcc Product: gcc Version: