public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jason at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/21581] (optimisation) Functions in anonymous namespaces should default to "hidden" visibility Date: Fri, 30 Jun 2006 01:17:00 -0000 [thread overview] Message-ID: <20060630011632.14592.qmail@sourceware.org> (raw) In-Reply-To: <bug-21581-4603@http.gcc.gnu.org/bugzilla/> ------- Comment #17 from jason at gcc dot gnu dot org 2006-06-30 01:16 ------- Subject: Bug 21581 Author: jason Date: Fri Jun 30 01:15:56 2006 New Revision: 115086 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115086 Log: PR c++/26905 PR c++/26612 PR c++/27000 PR c++/26984 PR c++/19134 * tree.c (build_decl_stat): Don't hande #pragma visibility here. * c-common.c (c_determine_visibility): Handle it here. * c-decl.c (finish_decl): Call c_determine_visibility for functions, too. * flags.h (enum symbol_visibility): Sort from most to least visibility. * tree.h: Likewise. * varasm.c (default_assemble_visibility): Likewise. * c-common.c (handle_visibility_attribute): Complain about trying to give visibility to an already defined class, or trying to change declared visibility. Always attach the attribute. * cp/decl2.c (determine_visibility): Overhaul. (determine_visibility_from_class): Likewise. (min_vis_r, type_visibility, constrain_visibility): New fns. (constrain_visibility_for_template): Likewise. (constrain_class_visibility): Likewise. * cp/decl.c (cp_finish_decl): Call determine_visibility for function decls, too. * cp/name-lookup.c (pushtag): Call determine_visibility. * cp/decl.c (duplicate_decls): Don't copy visibility from template to specialization. * cp/pt.c (check_explicit_specialization): Likewise. (lookup_template_class, tsubst_decl): Call determine_visibility. * cp/class.c (finish_struct_1): Call constrain_class_visibility. PR c++/26905 PR c++/21675 PR c++/17470 * cp/parser.c (cp_parser_explicit_instantiation): Pass the attributes to grokdeclarator. (cp_parser_type_specifier): Allow 'enum __attribute ((...)) E'. (cp_parser_enum_specifier): Likewise. (cp_parser_elaborated_type_specifier): Apply attributes if this declares only the class. (cp_parser_class_specifier): Apply leading attributes immediately. * cp/semantics.c (begin_class_definition): Add attributes parameter, apply them to the type. * attribs.c (decl_attributes): Ignore type-in-place attributes once the type has been defined. PR c++/21581 PR c++/25915 * cp/tree.c (decl_anon_ns_mem_p): New function. * cp/cp-tree.h: Declare it. * cp/decl2.c (determine_visibility): Make anonymous namespace members static. (min_vis_r, constrain_visibility): Likewise. * cp/rtti.c (create_pseudo_type_info): Set TREE_PUBLIC on pseudo-types. * cp/decl.c (cxx_init_decl_processing): Set TREE_PUBLIC on global_namespace. * cp/name-lookup.c (push_namespace_with_attribs): Don't set TREE_PUBLIC on anonymous namespaces. Added: trunk/gcc/testsuite/g++.dg/ext/visibility/anon2.C trunk/gcc/testsuite/g++.dg/ext/visibility/class1.C trunk/gcc/testsuite/g++.dg/ext/visibility/prop1.C trunk/gcc/testsuite/g++.dg/ext/visibility/redecl1.C trunk/gcc/testsuite/g++.dg/ext/visibility/template1.C trunk/gcc/testsuite/g++.dg/ext/visibility/template2.C trunk/gcc/testsuite/g++.dg/ext/visibility/template3.C trunk/gcc/testsuite/g++.dg/ext/visibility/template4.C trunk/gcc/testsuite/g++.dg/ext/visibility/typeinfo1.C trunk/gcc/testsuite/g++.dg/ext/visibility/warn1.C trunk/gcc/testsuite/g++.dg/ext/visibility/warn2.C trunk/gcc/testsuite/g++.dg/ext/visibility/warn3.C trunk/gcc/testsuite/g++.dg/ext/visibility/warn4.C Modified: trunk/gcc/ChangeLog trunk/gcc/attribs.c trunk/gcc/c-common.c trunk/gcc/c-decl.c trunk/gcc/cp/ChangeLog trunk/gcc/cp/class.c trunk/gcc/cp/cp-tree.h trunk/gcc/cp/decl.c trunk/gcc/cp/decl2.c trunk/gcc/cp/name-lookup.c trunk/gcc/cp/parser.c trunk/gcc/cp/pt.c trunk/gcc/cp/rtti.c trunk/gcc/cp/semantics.c trunk/gcc/cp/tree.c trunk/gcc/doc/extend.texi trunk/gcc/doc/invoke.texi trunk/gcc/flags.h trunk/gcc/testsuite/g++.dg/ext/attrib14.C trunk/gcc/testsuite/g++.dg/ext/attrib9.C trunk/gcc/testsuite/g++.dg/ext/visibility/anon1.C trunk/gcc/testsuite/g++.dg/ext/visibility/assign1.C trunk/gcc/testsuite/g++.dg/ext/visibility/fvisibility-override2.C trunk/gcc/testsuite/g++.dg/ext/visibility/virtual.C trunk/gcc/testsuite/g++.old-deja/g++.pt/enum5.C trunk/gcc/tree.c trunk/gcc/tree.h trunk/gcc/varasm.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21581
next prev parent reply other threads:[~2006-06-30 1:17 UTC|newest] Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-21581-4603@http.gcc.gnu.org/bugzilla/> 2005-12-12 17:22 ` bkoz at gcc dot gnu dot org 2005-12-12 17:37 ` gdr at integrable-solutions dot net 2006-03-13 1:42 ` pinskia at gcc dot gnu dot org 2006-03-20 21:11 ` pinskia at gcc dot gnu dot org 2006-03-21 14:31 ` jason at gcc dot gnu dot org 2006-03-21 16:15 ` jason at gcc dot gnu dot org 2006-03-21 17:01 ` pinskia at gcc dot gnu dot org 2006-03-21 18:03 ` sabre at nondot dot org 2006-03-21 18:05 ` pinskia at gcc dot gnu dot org 2006-03-21 18:06 ` sabre at nondot dot org 2006-04-05 22:20 ` jason at gcc dot gnu dot org 2006-04-07 6:33 ` pinskia at gcc dot gnu dot org 2006-06-30 1:17 ` jason at gcc dot gnu dot org [this message] 2006-06-30 15:29 ` pinskia at gcc dot gnu dot org 2006-08-28 12:29 ` jakub at gcc dot gnu dot org 2005-05-15 14:13 [Bug c++/21581] New: " arjanv at redhat dot com 2005-05-15 14:21 ` [Bug c++/21581] " pinskia at gcc dot gnu dot org 2005-05-17 16:40 ` bangerth at dealii dot org 2005-05-17 17:34 ` arjanv at redhat dot com 2005-05-17 17:44 ` arjanv at redhat dot com 2005-05-17 18:21 ` echristo at redhat dot com 2005-05-26 14:46 ` jakub at gcc dot gnu dot 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=20060630011632.14592.qmail@sourceware.org \ --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: linkBe 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).