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++/99573] ICE in module: internal compiler error: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in start_enum, at cp/decl.c:15663
Date: Wed, 14 Feb 2024 11:06:49 +0000	[thread overview]
Message-ID: <bug-99573-4-vsWq345fpo@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99573-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Nathaniel Shead <nshead@gcc.gnu.org>:

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

commit r14-8974-gbbb30f12a7e5ce008f59ec26c9e4cc65ee79fe56
Author: Nathaniel Shead <nathanieloshead@gmail.com>
Date:   Mon Feb 12 12:40:15 2024 +1100

    c++: Fix error recovery when redeclaring enum in different module [PR99573]

    This ensures that with modules enabled, redeclaring an enum in the wrong
    module or with the wrong underlying type no longer ICEs.

    The patch also rearranges the order of the checks a little because I
    think it's probably more important to note that you can't redeclare the
    enum all before complaining about mismatched underlying types etc.

    As a drive by this patch also adds some missing diagnostic groups, and
    rewords the module redeclaration error message to more closely match the
    wording used in other places this check is done.

            PR c++/99573

    gcc/cp/ChangeLog:

            * decl.cc (start_enum): Reorder check for redeclaring in module.
            Add missing auto_diagnostic_groups.

    gcc/testsuite/ChangeLog:

            * g++.dg/modules/enum-12.C: New test.

    Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
    Reviewed-by: Jason Merrill <jason@redhat.com>

  parent reply	other threads:[~2024-02-14 11:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-13 11:44 [Bug c++/99573] New: " niancw29 at 163 dot com
2021-03-30  1:13 ` [Bug c++/99573] " mpolacek at gcc dot gnu.org
2021-03-30  1:17 ` mpolacek at gcc dot gnu.org
2024-02-14 11:06 ` cvs-commit at gcc dot gnu.org [this message]
2024-02-14 11:08 ` nshead at gcc dot gnu.org
2024-03-11 21:21 ` 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-99573-4-vsWq345fpo@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).