From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by sourceware.org (Postfix) with ESMTPS id 7B5993895FCE for ; Tue, 6 Dec 2022 03:17:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7B5993895FCE Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pj1-x1034.google.com with SMTP id o12so13134975pjo.4 for ; Mon, 05 Dec 2022 19:17:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=i7cbVYxoxmMACgOVDZM+cSKIgUngSPpui/GOnn1oVdY=; b=R+jNK4pn90J+8SqodUJk/9bfRTSyxOhCbpmF5FHeUNxz38wThX9gj96GiJNlh6tXRl G+oVMy+DKEehlK89onTvaJzSonRPMnIerb/MRucz5FkteFmK51EISvlHbWKyrFffxmmO B00qCW3dwJiPQeBCip6vOrVJ0gBvphN9oF/Qvs16zeFQyT0lCt6+0mVMKpIE/r9vaHLr Vu5z/pNA6A8hi5laLmGWhyHbjkIIPcdT9obN0jb+E3KpW4DYH4DsM69yxG94/zt1gFog A43k2vCVZI3FwnV33oc0/2IvbIv+5K+9PwmPy3YCuOkGtN5YUKizGE+yPYX0b43MpDEL 2Phw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=i7cbVYxoxmMACgOVDZM+cSKIgUngSPpui/GOnn1oVdY=; b=2WXAiceFcjWjrt7luCFy6jfjf37orkRXNwklussLmzwDzIFoOuUem3tg3F7hSntJlc xaEfFsX85Fuv6LZwWa0Xp/pOFFNvpfOzwri9mjdrSw59o6IrgQStja2iB9/BQSbIr1Za CDy/2ARkxpLxhHacng4Hww65mT3TeTOgvaeXdLQLaG8d3TSJ/ePVzMePnjDWpp5JPp0H KXA2kmN7NoJqffxgWrjG7m9n++sF3gHba4PF2xXFQMrMZVltvQbXwU2m8bqQgXXruO6I JSfzM4wbc5YjK9QKBOjCoJu/ov2qQUoPd4d2uxngXpDIpwyIUV3F2U1n+0IOGxbb+dfI onZg== X-Gm-Message-State: ANoB5pnqZvSGSvCsefwZeYN6K+0302FIT2gj2rAlYthIyO8TKXY1Xxie AjsQcMFhlhtdzsDj2zdTz+iYspYwkcMQqsKFZgjSpqu7RCw= X-Google-Smtp-Source: AA0mqf7bMC4woC/pNGlZcTBNfKRpoASl9oYx+awO9J/R2eMOBI+TAZV5kJvKRGWt14bJyhaxKlO8O89MQv8tVLjaJiY= X-Received: by 2002:a17:90a:9101:b0:219:ea9c:10e5 with SMTP id k1-20020a17090a910100b00219ea9c10e5mr4306250pjo.65.1670296666047; Mon, 05 Dec 2022 19:17:46 -0800 (PST) MIME-Version: 1.0 From: Gavin Ray Date: Mon, 5 Dec 2022 22:17:33 -0500 Message-ID: Subject: Using [[may_alias]] in C23/C++23 on a union works in neither post-"union" position, or at the end of the definition To: gcc@gcc.gnu.org Content-Type: multipart/alternative; boundary="00000000000073093a05ef203f1b" X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --00000000000073093a05ef203f1b Content-Type: text/plain; charset="UTF-8" The reproduction is below. Not sure if this is intended or a bug, sorry to clutter up the mailing list if it's intended! union __attribute__((may_alias)) works {}; // :3:18: note: attribute for 'union broken2' must follow the 'union' keyword union broken1 {} [[may_alias]]; // Okay, so let's move it so it follows union... // :7:21: warning: 'may_alias' attribute directive ignored [-Wattributes] // 7 | union [[may_alias]] broken2 {}; // | ^~~~~~~ union [[may_alias]] broken2 {}; --00000000000073093a05ef203f1b--