From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B17D93858430; Tue, 14 Sep 2021 20:05:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B17D93858430 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/48396] std::type_info is implicitly declared Date: Tue, 14 Sep 2021 20:05:09 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.7.0 X-Bugzilla-Keywords: accepts-invalid, rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2021 20:05:09 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D48396 --- Comment #3 from Jonathan Wakely --- cp/rtti.c defines: /* Declare language defined type_info type and a pointer to const type_info. This is incomplete here, and will be completed when the user #includes . There are language defined restrictions on what can be done until that is included. Create the internal versions of the ABI types. */ void init_rtti_processing (void) { push_nested_namespace (std_node); tree type_info_type =3D xref_tag (class_type, get_identifier ("type_info"= )); pop_nested_namespace (std_node); const_type_info_type_node =3D cp_build_qualified_type (type_info_type, TYPE_QUAL_CONST); type_info_ptr_type =3D build_pointer_type (const_type_info_type_node); vec_alloc (unemitted_tinfo_decls, 124); create_tinfo_types (); } Is there a way to do that without making it visible to user code? Or without implicitly adding it to the GMF?=