public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/88115] Incorrect result from alignof in templates, if also using __alignof__. Date: Wed, 31 Mar 2021 02:58:40 +0000 [thread overview] Message-ID: <bug-88115-4-3SHrLE7OZr@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-88115-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88115 --- Comment #12 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>: https://gcc.gnu.org/g:a3bf6ce7f2e17f2c977c13df23eb718e7b433dcd commit r11-7921-ga3bf6ce7f2e17f2c977c13df23eb718e7b433dcd Author: Patrick Palka <ppalka@redhat.com> Date: Tue Mar 30 22:57:11 2021 -0400 c++: Adjust mangling of __alignof__ [PR88115] r11-4926 made __alignof__ get mangled differently from alignof, encoding __alignof__ as a vendor extended operator. But this mangling is problematic for the reasons mentioned in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88115#c6. This patch changes our mangling of __alignof__ to instead use the new "vendor extended expression" syntax that's proposed in https://github.com/itanium-cxx-abi/cxx-abi/issues/112. Clang does the same thing already, so after this patch Clang and GCC agree about the mangling of __alignof__(type) and __alignof__(expr). gcc/cp/ChangeLog: PR c++/88115 * mangle.c (write_expression): Adjust the mangling of __alignof__. include/ChangeLog: PR c++/88115 * demangle.h (enum demangle_component_type): Add DEMANGLE_COMPONENT_VENDOR_EXPR. libiberty/ChangeLog: PR c++/88115 * cp-demangle.c (d_dump, d_make_comp, d_expression_1) (d_count_templates_scopes): Handle DEMANGLE_COMPONENT_VENDOR_EXPR. (d_print_comp_inner): Likewise. <case DEMANGLE_COMPONENT_EXTENDED_OPERATOR>: Revert r11-4926 change. <case DEMANGLE_COMPONENT_UNARY>: Likewise. * testsuite/demangle-expected: Adjust __alignof__ tests. gcc/testsuite/ChangeLog: PR c++/88115 * g++.dg/cpp0x/alignof7.C: Adjust expected mangling.
next prev parent reply other threads:[~2021-03-31 2:58 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-88115-4@http.gcc.gnu.org/bugzilla/> 2020-10-05 9:22 ` redi at gcc dot gnu.org 2020-10-07 14:52 ` cvs-commit at gcc dot gnu.org 2020-10-08 23:32 ` cvs-commit at gcc dot gnu.org 2020-11-11 20:11 ` cvs-commit at gcc dot gnu.org 2020-11-11 20:11 ` cvs-commit at gcc dot gnu.org 2020-11-13 14:23 ` cvs-commit at gcc dot gnu.org 2020-11-15 3:26 ` foom at fuhm dot net 2020-11-17 1:23 ` foom at fuhm dot net 2020-11-17 14:14 ` redi at gcc dot gnu.org 2021-01-07 23:13 ` foom at fuhm dot net 2021-01-29 17:57 ` foom at fuhm dot net 2021-02-01 14:16 ` ppalka at gcc dot gnu.org 2021-03-31 2:58 ` cvs-commit at gcc dot gnu.org [this message] 2021-04-21 12:08 ` cvs-commit at gcc dot gnu.org 2021-04-21 12:10 ` ppalka at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-88115-4-3SHrLE7OZr@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).