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++/113389] ICE when explicit object parameter is not declared as the first parameter Date: Thu, 18 Jan 2024 14:12:23 +0000 [thread overview] Message-ID: <bug-113389-4-oA3EgrF0RI@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-113389-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113389 --- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Marek Polacek <mpolacek@gcc.gnu.org>: https://gcc.gnu.org/g:9840e0be78150b0ef6e29975a6244698d5a5580c commit r14-8239-g9840e0be78150b0ef6e29975a6244698d5a5580c Author: Marek Polacek <polacek@redhat.com> Date: Wed Jan 17 19:16:32 2024 -0500 c++: ICE when xobj is not the first parm [PR113389] In grokdeclarator/cdk_function the comment says that the find_xobj_parm lambda clears TREE_PURPOSE so that we can correctly detect an xobj that is not the first parameter. That's all good, but we should also clear the TREE_PURPOSE once we've given the error, otherwise we crash later in check_default_argument because the 'this' TREE_PURPOSE lacks a type. PR c++/113389 gcc/cp/ChangeLog: * decl.cc (grokdeclarator) <case cdk_function>: Set TREE_PURPOSE to NULL_TREE when emitting an error. gcc/testsuite/ChangeLog: * g++.dg/cpp23/explicit-obj-diagnostics10.C: New test.
next prev parent reply other threads:[~2024-01-18 14:12 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-01-14 17:14 [Bug c++/113389] New: " cooky.ykooc922 at gmail dot com 2024-01-15 18:47 ` [Bug c++/113389] " mpolacek at gcc dot gnu.org 2024-01-17 23:23 ` mpolacek at gcc dot gnu.org 2024-01-18 14:12 ` cvs-commit at gcc dot gnu.org [this message] 2024-01-18 15:01 ` mpolacek at gcc dot gnu.org 2024-01-20 17:09 ` pinskia 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-113389-4-oA3EgrF0RI@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).