aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/friend.c
diff options
context:
space:
mode:
authorJason Merrill <jason@yorick.cygnus.com>1998-10-15 19:43:51 +0000
committerJason Merrill <jason@gcc.gnu.org>1998-10-15 15:43:51 -0400
commit0f8766b8af0eb7c2ea063d5442f2b73fc6ebb506 (patch)
treeff389523064167bec47d1d00530d97b280e24d9b /gcc/cp/friend.c
parentd46965b9674d7006bbe525cea86da936cfc2e3c1 (diff)
downloadgcc-0f8766b8af0eb7c2ea063d5442f2b73fc6ebb506.zip
gcc-0f8766b8af0eb7c2ea063d5442f2b73fc6ebb506.tar.gz
gcc-0f8766b8af0eb7c2ea063d5442f2b73fc6ebb506.tar.bz2
decl.c (grokfndecl): ::main and __builtin_* get C linkage.
* decl.c (grokfndecl): ::main and __builtin_* get C linkage. Do mangling here. (grokdeclarator): Instead of here. * friend.c (do_friend): Lose special handling of ::main and __builtin_*. * cp-tree.h (DECL_MAIN_P): Check for C linkage. * spew.c (yylex): Clear looking_for_typename if we got 'enum { ... };'. From-SVN: r23117
Diffstat (limited to 'gcc/cp/friend.c')
-rw-r--r--gcc/cp/friend.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/gcc/cp/friend.c b/gcc/cp/friend.c
index acb9657..a3d198a 100644
--- a/gcc/cp/friend.c
+++ b/gcc/cp/friend.c
@@ -405,20 +405,6 @@ do_friend (ctype, declarator, decl, parmdecls, flags, quals, funcdef_flag)
decl = void_type_node;
}
}
- else if (TREE_CODE (decl) == FUNCTION_DECL
- && (MAIN_NAME_P (declarator)
- || (IDENTIFIER_LENGTH (declarator) > 10
- && IDENTIFIER_POINTER (declarator)[0] == '_'
- && IDENTIFIER_POINTER (declarator)[1] == '_'
- && strncmp (IDENTIFIER_POINTER (declarator)+2,
- "builtin_", 8) == 0)))
- {
- /* raw "main", and builtin functions never gets overloaded,
- but they can become friends. */
- add_friend (current_class_type, decl);
- DECL_FRIEND_P (decl) = 1;
- decl = void_type_node;
- }
/* A global friend.
@@ or possibly a friend from a base class ?!? */
else if (TREE_CODE (decl) == FUNCTION_DECL)