/* Get common system includes and various definitions and declarations based
on autoconf macros.
- Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of GCC.
not under control of the preprocessor. */
#define GCCBUGURL "<URL:http://www.gnu.org/software/gcc/bugs.html>"
-/* We must include stdarg.h/varargs.h before stdio.h. */
+/* We must include stdarg.h/varargs.h before stdio.h. */
#ifdef ANSI_PROTOTYPES
#include <stdarg.h>
#else
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
+/* We use this identifier later and it appears in some vendor param.h's. */
+# undef PREFETCH
#endif
#if HAVE_LIMITS_H
/* Get definitions of HOST_WIDE_INT and HOST_WIDEST_INT. */
#include "hwint.h"
+/* A macro to determine whether a VALUE lies inclusively within a
+ certain range without evaluating the VALUE more than once. This
+ macro won't warn if the VALUE is unsigned and the LOWER bound is
+ zero, as it would e.g. with "VALUE >= 0 && ...". Note the LOWER
+ bound *is* evaluated twice, and LOWER must not be greater than
+ UPPER. However the bounds themselves can be either positive or
+ negative. */
+#define IN_RANGE(VALUE, LOWER, UPPER) \
+ ((unsigned HOST_WIDE_INT) ((VALUE) - (LOWER)) <= ((UPPER) - (LOWER)))
+
/* Infrastructure for defining missing _MAX and _MIN macros. Note that
macros defined with these cannot be used in #if. */
#endif
/* If the system doesn't provide strsignal, we get it defined in
- libiberty but no declaration is supplied. */
+ libiberty but no declaration is supplied. */
#ifndef HAVE_STRSIGNAL
# ifndef strsignal
extern const char *strsignal PARAMS ((int));
#endif
/* HAVE_VOLATILE only refers to the stage1 compiler. We also check
- __STDC__ and assume gcc sets it and has volatile in stage >=2. */
+ __STDC__ and assume gcc sets it and has volatile in stage >=2. */
#if !defined(HAVE_VOLATILE) && !defined(__STDC__) && !defined(volatile)
#define volatile
#endif
# define STDERR_FILENO 2
#endif
-/* Some systems have mkdir that takes a single argument. */
+/* Some systems have mkdir that takes a single argument. */
#ifdef MKDIR_TAKES_ONE_ARG
# define mkdir(a,b) mkdir(a)
#endif
(IS_DIR_SEPARATOR ((STR)[0]) || (STR)[0] == '$')
#endif
-/* Get libiberty declarations. */
+/* Get libiberty declarations. */
#include "libiberty.h"
#include "symcat.h"
#endif
#ifndef offsetof
-#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
+#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *) 0)->MEMBER)
#endif
/* Traditional C cannot initialize union members of structs. Provide
a macro which expands appropriately to handle it. This only works
- if you intend to initalize the union member to zero since it relies
+ if you intend to initialize the union member to zero since it relies
on default initialization to zero in the traditional C case. */
#ifdef __STDC__
#define UNION_INIT_ZERO , {0}
#define TRUE true
#define FALSE false
-/* Provide three core typedefs used by everything, if we are compiling
- GCC. These used to be found in rtl.h and tree.h, but this is no
- longer practical. */
-#ifdef IN_GCC
-struct rtx_def;
-struct rtvec_def;
-union tree_node;
-typedef struct rtx_def *rtx;
-typedef struct rtvec_def *rtvec;
-typedef union tree_node *tree;
-#endif
-
/* As the last action in this file, we poison the identifiers that
shouldn't be used. Note, luckily gcc-3.0's token-based integrated
preprocessor won't trip on poisoned identifiers that arrive from
#undef calloc
#undef strdup
#pragma GCC poison malloc realloc calloc strdup
+
+/* Old target macros that have moved to the target hooks structure. */
+ #pragma GCC poison ASM_OPEN_PAREN ASM_CLOSE_PAREN \
+ FUNCTION_PROLOGUE FUNCTION_EPILOGUE \
+ FUNCTION_END_PROLOGUE FUNCTION_BEGIN_EPILOGUE \
+ DECL_MACHINE_ATTRIBUTES COMP_TYPE_ATTRIBUTES INSERT_ATTRIBUTES \
+ VALID_MACHINE_DECL_ATTRIBUTE VALID_MACHINE_TYPE_ATTRIBUTE \
+ SET_DEFAULT_TYPE_ATTRIBUTES SET_DEFAULT_DECL_ATTRIBUTES \
+ MERGE_MACHINE_TYPE_ATTRIBUTES MERGE_MACHINE_DECL_ATTRIBUTES \
+ MD_INIT_BUILTINS MD_EXPAND_BUILTIN ASM_OUTPUT_CONSTRUCTOR \
+ ASM_OUTPUT_DESTRUCTOR SIGNED_CHAR_SPEC MAX_CHAR_TYPE_SIZE \
+ WCHAR_UNSIGNED UNIQUE_SECTION SELECT_SECTION SELECT_RTX_SECTION \
+ ENCODE_SECTION_INFO STRIP_NAME_ENCODING
+
+/* And other obsolete target macros, or macros that used to be in target
+ headers and were not used, and may be obsolete or may never have
+ been used. */
+ #pragma GCC poison INT_ASM_OP ASM_OUTPUT_EH_REGION_BEG \
+ ASM_OUTPUT_EH_REGION_END ASM_OUTPUT_LABELREF_AS_INT \
+ DOESNT_NEED_UNWINDER EH_TABLE_LOOKUP OBJC_SELECTORS_WITHOUT_LABELS \
+ OMIT_EH_TABLE EASY_DIV_EXPR IMPLICIT_FIX_EXPR \
+ LONGJMP_RESTORE_FROM_STACK MAX_INT_TYPE_SIZE ASM_IDENTIFY_GCC \
+ STDC_VALUE TRAMPOLINE_ALIGN ASM_IDENTIFY_GCC_AFTER_SOURCE \
+ SLOW_ZERO_EXTEND SUBREG_REGNO_OFFSET DWARF_LINE_MIN_INSTR_LENGTH \
+ TRADITIONAL_RETURN_FLOAT NO_BUILTIN_SIZE_TYPE \
+ NO_BUILTIN_PTRDIFF_TYPE NO_BUILTIN_WCHAR_TYPE NO_BUILTIN_WINT_TYPE
+
#endif /* IN_GCC */
/* Note: not all uses of the `index' token (e.g. variable names and