From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9F9B73858D32; Tue, 16 Apr 2024 00:09:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9F9B73858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1713226189; bh=jGRFnDwdcEuA2GtnkMRs8Z17Ig9kVJJPLzQqEvkHCMo=; h=From:To:Subject:Date:From; b=oS1UfjzGO0cWO4uhzPkAPIg8UbrENsD3RAdx5IHS+qO2Qmkv//pOeSDIXLLE2hCyd OZmCdmGLJgpN+/pyy+oOuQq4AlV516oRvEAKCloIbqyqUy996kdjwooAxbWnkFVp8y 2XZH3rei0o8Zn8fpDxOAAN4y3xky94APA6SDZbpE= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/114730] New: should enum types be vector types? Date: Tue, 16 Apr 2024 00:09:49 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: documentation X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D114730 Bug ID: 114730 Summary: should enum types be vector types? Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: documentation Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Target Milestone: --- Take this C23 code: ``` #define vect16 __attribute__((vector_size(16))) enum tt : long {enumv}; extern vect16 enum tt t; ``` Currently GCC accepts it while clang rejects it. I can understand why we accept it but then if we change the underlying type= to bool, we still accept it even though vector_size does not apply to bool typ= es. I was trying to improve the documentation in this area when I found it. Note I filed https://github.com/llvm/llvm-project/issues/88817 for clang si= de of things.=