diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 38fe2bfc612..a4e818ee0d7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-07-08 Steve Ellcey + * gcc/c-pragma.h (add_to_renaming_pragma_list): New function. + * gcc/c-pragma.c (add_to_renaming_pragma_list): New function. + (handle_pragma_redefine_extname): Change to use new function. + 2002-07-08 Roger Sayle * combine.c (combine_simplify_rtx): Add an explicit cast diff --git a/gcc/c-pragma.c b/gcc/c-pragma.c index df9e1bf3c34..4c43baa9b0d 100644 --- a/gcc/c-pragma.c +++ b/gcc/c-pragma.c @@ -383,11 +383,18 @@ handle_pragma_redefine_extname (dummy) SET_DECL_ASSEMBLER_NAME (decl, newname); } else - pending_redefine_extname - = tree_cons (oldname, newname, pending_redefine_extname); + add_to_renaming_pragma_list(oldname, newname); } #endif +void +add_to_renaming_pragma_list (oldname, newname) + tree oldname, newname; +{ + pending_redefine_extname + = tree_cons (oldname, newname, pending_redefine_extname); +} + static GTY(()) tree pragma_extern_prefix; #ifdef HANDLE_PRAGMA_EXTERN_PREFIX @@ -444,7 +451,6 @@ maybe_apply_renaming_pragma (decl, asmname) asmname = build_string (strlen (oldasmname), oldasmname); } -#ifdef HANDLE_PRAGMA_REDEFINE_EXTNAME { tree *p, t; @@ -460,7 +466,6 @@ maybe_apply_renaming_pragma (decl, asmname) return build_string (strlen (newname), newname); } } -#endif #ifdef HANDLE_PRAGMA_EXTERN_PREFIX if (pragma_extern_prefix && !asmname) diff --git a/gcc/c-pragma.h b/gcc/c-pragma.h index 8e7589f1fdd..7911c5a6502 100644 --- a/gcc/c-pragma.h +++ b/gcc/c-pragma.h @@ -62,6 +62,7 @@ extern void cpp_register_pragma PARAMS ((cpp_reader *, extern void maybe_apply_pragma_weak PARAMS ((tree)); extern tree maybe_apply_renaming_pragma PARAMS ((tree, tree)); +extern void add_to_renaming_pragma_list PARAMS ((tree, tree)); extern int c_lex PARAMS ((tree *));