OSDN Git Service

* init.c (build_new): Allow enumeration types for the array-bounds
[pf3gnuchains/gcc-fork.git] / gcc / defaults.h
index b6fe9ec..098beae 100644 (file)
@@ -1,7 +1,5 @@
-/* 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
+/* Definitions of various defaults for tm.h macros.
+   Copyright (C) 1992, 1996, 1997, 1998, 1999, 2000, 2001
    Free Software Foundation, Inc.
    Contributed by Ron Guilmette (rfg@monkeys.com)
 
@@ -151,6 +149,15 @@ do { ASM_OUTPUT_LABEL(FILE,LABEL_ALTERNATE_NAME (INSN)); } while (0)
 #endif
 #endif
 
+/* This determines whether or not we support link-once semantics.  */
+#ifndef SUPPORTS_ONE_ONLY
+#ifdef MAKE_DECL_ONE_ONLY
+#define SUPPORTS_ONE_ONLY 1
+#else
+#define SUPPORTS_ONE_ONLY 0
+#endif
+#endif
+
 /* If the target supports weak symbols, define TARGET_ATTRIBUTE_WEAK to
    provide a weak attribute.  Else define it to nothing. 
 
@@ -167,6 +174,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)
@@ -175,7 +188,7 @@ do { ASM_OUTPUT_LABEL(FILE,LABEL_ALTERNATE_NAME (INSN)); } while (0)
 
 #if defined (DWARF2_UNWIND_INFO) && !defined (EH_FRAME_SECTION)
 # if defined (EH_FRAME_SECTION_ASM_OP)
-#  define EH_FRAME_SECTION() eh_frame_section();
+#  define EH_FRAME_SECTION() eh_frame_section ()
 # else
    /* If we aren't using crtstuff to run ctors, don't use it for EH.  */
 #  if defined (ASM_OUTPUT_SECTION_NAME) && defined (ASM_OUTPUT_CONSTRUCTOR)
@@ -186,6 +199,33 @@ do { ASM_OUTPUT_LABEL(FILE,LABEL_ALTERNATE_NAME (INSN)); } while (0)
 # endif
 #endif
 
+/* If we have no definition for UNIQUE_SECTION, but do have the 
+   ability to generate arbitrary sections, construct something
+   reasonable.  */
+#ifdef ASM_OUTPUT_SECTION_NAME
+#ifndef UNIQUE_SECTION
+#define UNIQUE_SECTION(DECL,RELOC)                             \
+do {                                                           \
+  int len;                                                     \
+  const char *name;                                            \
+  char *string;                                                        \
+                                                               \
+  name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (DECL));      \
+  /* Strip off any encoding in name.  */                       \
+  STRIP_NAME_ENCODING (name, name);                            \
+                                                               \
+  len = strlen (name) + 1;                                     \
+  string = alloca (len + 1);                                   \
+  sprintf (string, ".%s", name);                               \
+                                                               \
+  DECL_SECTION_NAME (DECL) = build_string (len, string);       \
+} while (0)
+#endif
+#ifndef UNIQUE_SECTION_P
+#define UNIQUE_SECTION_P(DECL) 0
+#endif
+#endif
+
 /* By default, we generate a label at the beginning and end of the
    text section, and compute the size of the text section by
    subtracting the two.  However, on some platforms that doesn't 
@@ -252,5 +292,21 @@ do { ASM_OUTPUT_LABEL(FILE,LABEL_ALTERNATE_NAME (INSN)); } while (0)
 #define LONG_DOUBLE_TYPE_SIZE (BITS_PER_WORD * 2)
 #endif
 
+#ifndef BUILD_VA_LIST_TYPE
+#define BUILD_VA_LIST_TYPE(X) ((X) = ptr_type_node)
+#endif
+
+#ifndef PIC_OFFSET_TABLE_REGNUM
+#define PIC_OFFSET_TABLE_REGNUM INVALID_REGNUM
+#endif
+
+/* By default, the preprocessor should be invoked the same way in C++
+   as in C.  */
+#ifndef CPLUSPLUS_CPP_SPEC
+#ifdef CPP_SPEC
+#define CPLUSPLUS_CPP_SPEC CPP_SPEC
+#endif
+#endif
+
 #endif  /* GCC_DEFAULTS_H */