From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 280F83858C35; Mon, 4 Dec 2023 06:51:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 280F83858C35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1701672687; bh=oKeUfA80Y7/2qyOt+OJ1kRKPZjSiPNE+wFUET+XQCJg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=LVXZSrCgxZaYrxkTLSGJM/VlR4gmdADLMWywK2dnymP32NhjFTSIctKpisSeC5cnp 2nqqKBA2KTZEREypxUZumy93PB31rXTQDNxGCHJBDXd7Xu3LHmgG+YrLtdLnp9sPo4 HPyzhgGbxMpXt15/iuYafUV+a9PQIUE/xNxtT8j4= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/112841] typeof_unqual is not removing qualifiers from the element type of array types Date: Mon, 04 Dec 2023 06:51:27 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D112841 --- Comment #2 from Andrew Pinski --- Note clang also gets this "wrong". You can see that from: ``` const char* const animals[] =3D { "aardvark", "bluejay", "catte", }; int main (int argc, char* argv[]) { const char* animals2_array1[3]; typeof_unqual(animals) animals2_array; animals2_array1[0] =3D 0; animals2_array[0] =3D 0; return 0; } ```=