<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/92667>92667</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            typeof_unqual does not remove qualifiers from qualified array types
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          Halalaluyafail3
      </td>
    </tr>
</table>

<pre>
    Clang does not remove qualifiers from qualified array types, i.e. array types with qualified element types with typeof_unqual in some situations. See [GCC bug 112841](https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112841) which has the following example:
```cpp
const char* const animals[] = {
"aardvark",
"bluejay",
 "catte",
};
int main (int argc, char* argv[]) {
 const char* animals2_array1[3];
 typeof_unqual(animals) animals2_array;
 animals2_array1[0] = 0;
 animals2_array[0] = 0;
 return 0;
}
```
Clang has `typeof_unqual(animals)` result in a const qualified type which results in the assignment `animals2_array[0] = 0;` failing.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycVN2OqzYQfprhZnSQMT-BCy42iWjv-wArAwP41Nipf5KmT185JLvJVqtKRyBhj78ZfzPzDcI5OWuiFso9lMdEBL8Y2_4uVHzCVUxCqjzpzXhtD0roGUdDDrXxaGk1Z8K_glBykmQdTtasH_sRhbXiiv56Igf8gDKl9NmGF-mXJzgpWkn758O4NNN70BGFUqMzK6GTPggvjXYp_kGEUO5_OxywDzNmGa-LDMoj8Hrx_uQgfwPeAe_mYUhnHVJjZ-BdH-Z_pFICeOcWc3nvw5wOs4S8kyPkx3sY3uBlkcOCi3DoF8LJKGUuUs9If4v1pCiGZ0dgb1Cx7R1Op80yGO08DouwwN9w2wktV6HcVmuE_Iiw298DcC6EHc_C_gmcAz98mHsV6Ke4PlsROB-E9_QC3R0hv0eT2uMqpEbgdVwLOw-xBw86ws7njUVM8oMEvpK-0-Xvt65lUO7z6PG45LU9wOtHerz54vrp8t-Q7FEK9h3qG5AlH6x-ssQCvDZj2266jT2Ein3PGSqGllxQPipN3Gvxqc_oedfDBnMRF2WxDdFNvFCx_yFfMYwzJfWcJmObj03eiITabJdVrKyLukyWtm-aihVVndGwK8empGnoi6nIioZFHCWy5YwXrMzqrC6LokzzZmx25VRVeV-IHSugYLQKqVKlzmsUfSKdC9Q2vKp2iRI9KXebec41XfB2GMVUHhPbRp8ffZgdFExJ591nFC-9ovZ1Ln_pj5AEq9ovIyr9Evp0MCvwLt54__w4WfOTBg-8u_F0wLtbHv8GAAD__5vbfbY">