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++/48396] std::type_info is implicitly declared
Date: Wed, 15 Sep 2021 04:27:45 +0000	[thread overview]
Message-ID: <bug-48396-4-shOu0xl4jK@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-48396-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <jason@gcc.gnu.org>:

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

commit r12-3538-ga53781c8fd258608780821168a7f5faf7be63690
Author: Jason Merrill <jason@redhat.com>
Date:   Tue Sep 14 17:37:27 2021 -0400

    c++: don't predeclare std::type_info [PR48396]

    We've always predeclared std::type_info, which has been wrong for a while,
    but now with modules it becomes more of a practical problem, if we want to
    declare it in the purview of a module.  So don't predeclare it.  For
    building up the type_info information to write out with the vtable, we can
    use void* instead of type_info*, since they already aren't the real types.

            PR c++/48396

    gcc/cp/ChangeLog:

            * cp-tree.h (enum cp_tree_index): Remove CPTI_TYPE_INFO_PTR_TYPE.
            (type_info_ptr_type): Remove.
            * rtti.c (init_rtti_processing): Don't predeclare std::type_info.
            (typeid_ok_p): Check for null const_type_info_type_node.
            (type_info_ptr_type, get_void_tinfo_ptr): New fns.
            (get_tinfo_decl_dynamic, get_tinfo_ptr): Use them.
            (ptr_initializer, ptm_initializer, get_pseudo_ti_init): Use them.
            (get_tinfo_desc): Use const_ptr_type_node.

    gcc/testsuite/ChangeLog:

            * g++.dg/rtti/undeclared1.C: New test.

  parent reply	other threads:[~2021-09-15  4:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-31 23:33 [Bug c++/48396] New: Undeclared library types accepted in namespace std paolo.carlini at oracle dot com
2012-04-12 12:25 ` [Bug c++/48396] " redi at gcc dot gnu.org
2021-03-05 10:09 ` [Bug c++/48396] std::type_info is implicitly declared redi at gcc dot gnu.org
2021-09-14 20:00 ` redi at gcc dot gnu.org
2021-09-14 20:05 ` redi at gcc dot gnu.org
2021-09-14 20:49 ` jason at gcc dot gnu.org
2021-09-15  4:27 ` cvs-commit at gcc dot gnu.org [this message]
2021-09-15  4:28 ` jason 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-48396-4-shOu0xl4jK@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).