diff options
author | oldham <oldham@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-01-15 03:33:56 +0000 |
---|---|---|
committer | oldham <oldham@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-01-15 03:33:56 +0000 |
commit | 246dd8156238526ae92c4052535ca888ea786042 (patch) | |
tree | 5b522cca0fe69fade7ce32a3bd076b8b4accee35 | |
parent | 8d846d6062fe3b791bf4ef8dada434bb885180dc (diff) | |
download | gcc-246dd8156238526ae92c4052535ca888ea786042.tar.gz |
gcc/ChangeLog:
2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
* defaults.h (SUPPORTS_INIT_PRIORITY): New macro to indicate the
linker supports the init_priority C++ attribute.
* tm.texi (SUPPORTS_INIT_PRIORITY): Documentation for new macro.
* config/mips/iris6.h (SUPPORTS_INIT_PRIORITY): Indicate Irix
linker does not support init_priority C++ attribute.
gcc/cp/ChangeLog:
2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
* tree.c: Add defaults.h
(cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
* Make-lang.in (cp/tree.o): Add defaults.h.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39023 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/config/mips/iris6.h | 6 | ||||
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/Make-lang.in | 2 | ||||
-rw-r--r-- | gcc/cp/tree.c | 15 | ||||
-rw-r--r-- | gcc/defaults.h | 8 | ||||
-rw-r--r-- | gcc/tm.texi | 7 |
7 files changed, 46 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2d2a7a5101c..12d67febc80 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2001-01-14 Jeffrey Oldham <oldham@codesourcery.com> + + * defaults.h (SUPPORTS_INIT_PRIORITY): New macro to indicate the + linker supports the init_priority C++ attribute. + * tm.texi (SUPPORTS_INIT_PRIORITY): Documentation for new macro. + * config/mips/iris6.h (SUPPORTS_INIT_PRIORITY): Indicate Irix + linker does not support init_priority C++ attribute. + Sun Jan 14 22:31:30 2001 J"orn Rennecke <amylaar@redhat.com> * Makefile.in (libgcc1-test.o): Depends on stmp-int-hdrs. diff --git a/gcc/config/mips/iris6.h b/gcc/config/mips/iris6.h index 3c888531238..b7a6f8f64e3 100644 --- a/gcc/config/mips/iris6.h +++ b/gcc/config/mips/iris6.h @@ -1,5 +1,5 @@ /* Definitions of target machine for GNU compiler. Iris version 6. - Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc. + Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU CC. @@ -205,6 +205,10 @@ Boston, MA 02111-1307, USA. */ #define ASM_WEAKEN_LABEL(FILE,NAME) ASM_OUTPUT_WEAK_ALIAS(FILE,NAME,0) +/* Irix assembler does not support the init_priority C++ attribute. */ +#undef SUPPORTS_INIT_PRIORITY +#define SUPPORTS_INIT_PRIORITY 0 + #define POPSECTION_ASM_OP "\t.popsection" #define DEBUG_INFO_SECTION ".debug_info,0x7000001e,0,0,1" diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index b5a9194e621..21ca094f989 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2001-01-14 Jeffrey Oldham <oldham@codesourcery.com> + + * tree.c: Add defaults.h + (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY. + * Make-lang.in (cp/tree.o): Add defaults.h. + 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk> * Make-lang.in (CXX_C_OBJS): Add c-format.o. diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in index 766e695ab82..b6bbd37516a 100644 --- a/gcc/cp/Make-lang.in +++ b/gcc/cp/Make-lang.in @@ -274,7 +274,7 @@ cp/method.o: cp/method.c $(CXX_TREE_H) toplev.h $(GGC_H) $(RTL_H) $(EXPR_H) cp/cvt.o: cp/cvt.c $(CXX_TREE_H) cp/decl.h flags.h toplev.h convert.h cp/search.o: cp/search.c $(CXX_TREE_H) stack.h flags.h toplev.h $(RTL_H) cp/tree.o: cp/tree.c $(CXX_TREE_H) flags.h toplev.h $(GGC_H) $(RTL_H) \ - insn-config.h integrate.h + insn-config.h integrate.h defaults.h cp/ptree.o: cp/ptree.c $(CXX_TREE_H) system.h cp/rtti.o: cp/rtti.c $(CXX_TREE_H) flags.h toplev.h defaults.h cp/except.o: cp/except.c $(CXX_TREE_H) flags.h $(RTL_H) except.h toplev.h \ diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 4f55c703240..88f07be94dc 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -1,6 +1,6 @@ /* Language-dependent node constructors for parse phase of GNU compiler. Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000 Free Software Foundation, Inc. + 1999, 2000, 2001 Free Software Foundation, Inc. Hacked by Michael Tiemann (tiemann@cygnus.com) This file is part of GNU CC. @@ -31,6 +31,7 @@ Boston, MA 02111-1307, USA. */ #include "ggc.h" #include "insn-config.h" #include "integrate.h" +#include "defaults.h" static tree bot_manip PARAMS ((tree *, int *, void *)); static tree bot_replace PARAMS ((tree *, int *, void *)); @@ -2312,8 +2313,16 @@ cp_valid_lang_attribute (attr_name, attr_args, decl, type) ("requested init_priority is reserved for internal use"); } - DECL_INIT_PRIORITY (decl) = pri; - return 1; + if (SUPPORTS_INIT_PRIORITY) + { + DECL_INIT_PRIORITY (decl) = pri; + return 1; + } + else + { + error ("init_priority attribute is not supported on this platform"); + return 0; + } } return 0; diff --git a/gcc/defaults.h b/gcc/defaults.h index 2f2aee9346f..2aa5218d464 100644 --- a/gcc/defaults.h +++ b/gcc/defaults.h @@ -1,7 +1,7 @@ /* Definitions of various defaults for how to do assembler output (most of which are designed to be appropriate for GAS or for some BSD assembler). - Copyright (C) 1992, 1996, 1997, 1998, 1999, 2000 + Copyright (C) 1992, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. Contributed by Ron Guilmette (rfg@monkeys.com) @@ -167,6 +167,12 @@ do { ASM_OUTPUT_LABEL(FILE,LABEL_ALTERNATE_NAME (INSN)); } while (0) # endif #endif +/* If the target supports init_priority C++ attribute, give + SUPPORTS_INIT_PRIORITY a nonzero value. */ +#ifndef SUPPORTS_INIT_PRIORITY +#define SUPPORTS_INIT_PRIORITY 1 +#endif /* SUPPORTS_INIT_PRIORITY */ + /* If we have a definition of INCOMING_RETURN_ADDR_RTX, assume that the rest of the DWARF 2 frame unwind support is also provided. */ #if !defined (DWARF2_UNWIND_INFO) && defined (INCOMING_RETURN_ADDR_RTX) diff --git a/gcc/tm.texi b/gcc/tm.texi index 0cba9096895..16afc46b008 100644 --- a/gcc/tm.texi +++ b/gcc/tm.texi @@ -6387,6 +6387,13 @@ If defined, @code{main} will call @code{__main} despite the presence of where the init section is not actually run automatically, but is still useful for collecting the lists of constructors and destructors. +@item SUPPORTS_INIT_PRIORITY +@findex SUPPORTS_INIT_PRIORITY +If nonzero, the C++ @code{init_priority} attribute is supported and the +compiler should emit instructions to control the order of initialization +of objects. If zero, the compiler will issue an error message upon +encountering an @code{init_priority} attribute. + @item ASM_OUTPUT_CONSTRUCTOR (@var{stream}, @var{name}) @findex ASM_OUTPUT_CONSTRUCTOR Define this macro as a C statement to output on the stream @var{stream} |