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++/99120] [8/9/10 Regression] ICE in -Wshadow in templated member function
Date: Fri, 09 Apr 2021 22:38:09 +0000	[thread overview]
Message-ID: <bug-99120-4-NwdZ8qEmjf@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99120-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99120

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Marek Polacek
<mpolacek@gcc.gnu.org>:

https://gcc.gnu.org/g:c7d7c15540d5173f76b570bd457e866f09a17722

commit r10-9686-gc7d7c15540d5173f76b570bd457e866f09a17722
Author: Marek Polacek <polacek@redhat.com>
Date:   Fri Mar 5 10:41:41 2021 -0500

    c++: ICE with -Wshadow and enumerator in template [PR99120]

    We crash here, because in a template, an enumerator doesn't have
    a type until we've called finish_enum_value_list.  But our -Wshadow
    implementation, check_local_shadow, is called when we pushdecl in
    build_enumerator, which takes place before finish_enum_value_list.

    gcc/cp/ChangeLog:

            PR c++/99120
            * name-lookup.c (check_local_shadow): Check if the type of decl
            is non-null before checking TYPE_PTR*.

    gcc/testsuite/ChangeLog:

            PR c++/99120
            * g++.dg/warn/Wshadow-17.C: New test.

    (cherry picked from commit c2e64c33d9d903f0a52565ad98300feea0ffc580)

  parent reply	other threads:[~2021-04-09 22:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-16 17:28 [Bug c++/99120] New: " maeriberii+gcc at gmail dot com
2021-02-16 17:37 ` [Bug c++/99120] [8/9/10/11 Regression] " mpolacek at gcc dot gnu.org
2021-02-16 17:39 ` mpolacek at gcc dot gnu.org
2021-02-16 17:40 ` mpolacek at gcc dot gnu.org
2021-03-05 22:56 ` cvs-commit at gcc dot gnu.org
2021-03-05 22:57 ` [Bug c++/99120] [8/9/10 " mpolacek at gcc dot gnu.org
2021-04-09 22:38 ` cvs-commit at gcc dot gnu.org [this message]
2021-04-09 22:38 ` mpolacek 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-99120-4-NwdZ8qEmjf@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: link
Be 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).