+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.
/* 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.
#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"
+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.
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 \
/* 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.
#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 *));
("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;
/* 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)
# 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)
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}