From 5edb8b93cb7f3fcede08684ac9b525f82e0b824d Mon Sep 17 00:00:00 2001 From: Mike Stump Date: Tue, 20 Dec 1994 22:14:37 +0000 Subject: [PATCH] 51st Cygnus<->FSF merge From-SVN: r8676 --- gcc/cp/ChangeLog | 13 +++++++++++++ gcc/cp/Make-lang.in | 3 +++ gcc/cp/decl2.c | 12 ++++++++++++ gcc/cp/method.c | 5 ++++- 4 files changed, 32 insertions(+), 1 deletion(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 8fa9479866e..44511fcdaeb 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,16 @@ +Mon Dec 19 22:40:53 1994 Mike Stump + + * decl2.c (check_classfn): Don't use decls_match yet, as it modifies + static functions to early. + +Thu Dec 19 22:37:48 1994 Mike Stump + + * method.c (make_thunk): Handle encoding of positive thunk offsets. + +Sat Dec 17 13:29:50 1994 Doug Evans + + * Make-lang.in (.PHONY): Tell GNU make C++ and c++ are phony targets. + Thu Dec 15 16:32:12 1994 Mike Stump * decl2.c (check_classfn): Use decls_match to check if this has diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in index 8442d23f1d3..d8bf23ba013 100644 --- a/gcc/cp/Make-lang.in +++ b/gcc/cp/Make-lang.in @@ -56,6 +56,9 @@ GXX_CROSS_NAME = `t='$(program_transform_cross_name)'; echo g++ | sed $$t` # to do the right thing within all.cross. C++ c++: cc1plus +# Tell GNU make to ignore these if they exist. +.PHONY: C++ c++ + # Create the compiler driver for g++. g++: $(srcdir)/cp/g++.c $(CONFIG_H) $(LIBDEPS) $(CC) $(ALL_CFLAGS) $(INCLUDES) $(LDFLAGS) -o g++ $(srcdir)/cp/g++.c $(LIBS) diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 5e065725905..af7d7d712c8 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -1147,10 +1147,22 @@ check_classfn (ctype, cname, function) { if (DECL_ASSEMBLER_NAME (function) == DECL_ASSEMBLER_NAME (fndecl)) return; +#if 0 + /* This should work, but causes libg++ to fail + make check-tFix. */ /* We have to do more extensive argument checking here, as the name may have been changed by asm("new_name"). */ if (decls_match (function, fndecl)) return; +#else + if (DECL_NAME (function) == DECL_NAME (fndecl) + && comptypes (TREE_TYPE (TREE_TYPE (function)), + TREE_TYPE (TREE_TYPE (fndecl)), 1) + && compparms (TYPE_ARG_TYPES (TREE_TYPE (function)), + TYPE_ARG_TYPES (TREE_TYPE (fndecl)), + 3)) + return; +#endif fndecl = DECL_CHAIN (fndecl); } break; /* loser */ diff --git a/gcc/cp/method.c b/gcc/cp/method.c index 90dd4df3ba0..da2a7824852 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -1749,7 +1749,10 @@ make_thunk (function, delta) if (TREE_CODE (func_decl) != FUNCTION_DECL) abort (); func_name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (func_decl)); - sprintf (buffer, "__thunk_%d_%s", -delta, func_name); + if (delta<=0) + sprintf (buffer, "__thunk_%d_%s", -delta, func_name); + else + sprintf (buffer, "__thunk_n%d_%s", delta, func_name); thunk_id = get_identifier (buffer); thunk = IDENTIFIER_GLOBAL_VALUE (thunk_id); if (thunk && TREE_CODE (thunk) != THUNK_DECL)