summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/cp/decl2.c
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2013-12-18 19:07:29 +0000
committerpfg <pfg@FreeBSD.org>2013-12-18 19:07:29 +0000
commit6f93e9ad10bb17a8b07e0cab16df0097d5ba6090 (patch)
tree234e9f04b601b7b9c9ff48f56f79bcd379485350 /contrib/gcc/cp/decl2.c
parenta70f2adf579c967cdf8017632ea2266fe2e9eb4a (diff)
downloadFreeBSD-src-6f93e9ad10bb17a8b07e0cab16df0097d5ba6090.zip
FreeBSD-src-6f93e9ad10bb17a8b07e0cab16df0097d5ba6090.tar.gz
MFC r258428, r258445
gcc: another round of merges from the gcc pre-43 branch. Bring The following revisions from the gcc43 branch[1]: 118360, 118361, 118363, 118576, 119820, 123906, 125246, and 125721. They all have in common that the were merged long ago into Apple's gcc and should help improve the general quality of the compiler and make it easier to bring new features from Apple's gcc42. For details please review the additions to the files: gcc/ChangeLog.gcc43 gcc/cp/ChangeLog.gcc43 (new, adds previous revisions) Fix crosscompilation (r258445 by andreast) Reference: [1] http://gcc.gnu.org/viewcvs/gcc/trunk/?pathrev=126700 Obtained from: gcc pre4.3 (GPLv2) branch MFC after: 3 weeks
Diffstat (limited to 'contrib/gcc/cp/decl2.c')
-rw-r--r--contrib/gcc/cp/decl2.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/contrib/gcc/cp/decl2.c b/contrib/gcc/cp/decl2.c
index 310dc83..f0b46c9 100644
--- a/contrib/gcc/cp/decl2.c
+++ b/contrib/gcc/cp/decl2.c
@@ -1698,10 +1698,6 @@ determine_visibility (tree decl)
class can influence the visibility of the DECL. */
if (DECL_CLASS_SCOPE_P (decl))
class_type = DECL_CONTEXT (decl);
- else if (TREE_CODE (decl) == VAR_DECL
- && DECL_TINFO_P (decl)
- && CLASS_TYPE_P (TREE_TYPE (DECL_NAME (decl))))
- class_type = TREE_TYPE (DECL_NAME (decl));
else
{
/* Not a class member. */
@@ -1787,7 +1783,8 @@ determine_visibility (tree decl)
{
/* Propagate anonymity from type to decl. */
int tvis = type_visibility (TREE_TYPE (decl));
- if (tvis == VISIBILITY_ANON)
+ if (tvis == VISIBILITY_ANON
+ || ! DECL_VISIBILITY_SPECIFIED (decl))
constrain_visibility (decl, tvis);
}
}
@@ -2326,7 +2323,7 @@ start_objects (int method_type, int initp)
sprintf (type, "%c", method_type);
fndecl = build_lang_decl (FUNCTION_DECL,
- get_file_function_name_long (type),
+ get_file_function_name (type),
build_function_type (void_type_node,
void_list_node));
start_preparsed_function (fndecl, /*attrs=*/NULL_TREE, SF_PRE_PARSED);
@@ -2335,6 +2332,10 @@ start_objects (int method_type, int initp)
to scan the object file to find its ctor/dtor routine. */
TREE_PUBLIC (current_function_decl) = ! targetm.have_ctors_dtors;
+ /* Mark as artificial because it's not explicitly in the user's
+ source code. */
+ DECL_ARTIFICIAL (current_function_decl) = 1;
+
/* Mark this declaration as used to avoid spurious warnings. */
TREE_USED (current_function_decl) = 1;
OpenPOWER on IntegriCloud