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++/98770] [modules] including certain stdlib headers in the global module fragment of different modules causes conflicting global module declarations
Date: Thu, 28 Jan 2021 12:57:44 +0000	[thread overview]
Message-ID: <bug-98770-4-BznJ1fZe6K@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-98770-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Nathan Sidwell <nathan@gcc.gnu.org>:

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

commit r11-6954-gaf66f4f1b06f5e0c099dfced2fcf7b1b23fa53e7
Author: Nathan Sidwell <nathan@acm.org>
Date:   Thu Jan 28 04:48:33 2021 -0800

    c++: header unit template alias merging [PR 98770]

    Typedefs are streamed by streaming the underlying type, and then
    recreating the typedef.  But this breaks checking a duplicate is the
    same as the original when it is a template alias -- we end up checking
    a template alias (eg __void_t) against the underlying type (void).
    And those are not the same template alias.  This stops pretendig that
    the underlying type is the typedef for that checking and tells
    is_matching_decl 'you have a typedef', so it knows what to do.  (We do
    not want to recreate the typedef of the duplicate, because that whole
    set of nodes is going to go away.)

            PR c++/98770
            gcc/cp/
            * module.cc (trees_out::decl_value): Swap is_typedef & TYPE_NAME
            check order.
            (trees_in::decl_value): Do typedef frobbing only when installing
            a new typedef, adjust is_matching_decl call.  Swap is_typedef
            & TYPE_NAME check.
            (trees_in::is_matching_decl): Add is_typedef parm. Adjust variable
            names and deal with typedef checking.
            gcc/testsuite/
            * g++.dg/modules/pr98770_a.C: New.
            * g++.dg/modules/pr98770_b.C: New.

  reply	other threads:[~2021-01-28 12:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-20 14:36 [Bug c++/98770] New: " pilarlatiesa at gmail dot com
2021-01-28 12:57 ` cvs-commit at gcc dot gnu.org [this message]
2021-01-28 12:58 ` [Bug c++/98770] " nathan 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-98770-4-BznJ1fZe6K@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).