+Thu Feb 25 23:33:06 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * Makefile.in (cppmain.o, cpplib.o, cpphash.o, cppalloc.o,
+ cpperror.o, cppexp.o, cppfiles.o, cppinit.o, fix-header.o,
+ scan-decls.o): Don't depend on machmode.h.
+
+ * cppexp.c: Don't define CHAR_BIT or HOST_BITS_PER_WIDE_INT anymore.
+ Replace all instances of HOST_WIDE_INT with HOST_WIDEST_INT.
+
+ * cppfiles.c: Likewise.
+
+ * cpplib.c: Likewise.
+
+ * cpplib.h: Likewise. Also don't include machmode.h anymore.
+
Thu Feb 25 18:46:26 1999 Richard Henderson <rth@cygnus.com>
* gcc.c (default_compilers): Define __FAST_MATH__ when appropriate.
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cppmain$(exeext) cppmain.o \
libcpp.a $(LIBS)
-cppmain.o: cppmain.c $(CONFIG_H) cpplib.h intl.h machmode.h system.h
+cppmain.o: cppmain.c $(CONFIG_H) cpplib.h intl.h system.h
cppulp.o: cppulp.c $(CONFIG_H) system.h output.h
-cpplib.o: cpplib.c $(CONFIG_H) cpplib.h intl.h machmode.h system.h cpphash.h
-cpphash.o: cpphash.c $(CONFIG_H) cpplib.h intl.h machmode.h system.h cpphash.h
-cppalloc.o: cppalloc.c $(CONFIG_H) cpplib.h intl.h machmode.h system.h
-cpperror.o: cpperror.c $(CONFIG_H) cpplib.h intl.h machmode.h system.h
-cppexp.o: cppexp.c $(CONFIG_H) cpplib.h intl.h machmode.h system.h
-cppfiles.o: cppfiles.c $(CONFIG_H) cpplib.h intl.h machmode.h system.h
-
-cppinit.o: cppalloc.c $(CONFIG_H) cpplib.h intl.h machmode.h system.h \
+cpplib.o: cpplib.c $(CONFIG_H) cpplib.h intl.h system.h cpphash.h
+cpphash.o: cpphash.c $(CONFIG_H) cpplib.h intl.h system.h cpphash.h
+cppalloc.o: cppalloc.c $(CONFIG_H) cpplib.h intl.h system.h
+cpperror.o: cpperror.c $(CONFIG_H) cpplib.h intl.h system.h
+cppexp.o: cppexp.c $(CONFIG_H) cpplib.h intl.h system.h
+cppfiles.o: cppfiles.c $(CONFIG_H) cpplib.h intl.h system.h
+
+cppinit.o: cppalloc.c $(CONFIG_H) cpplib.h intl.h system.h \
cpphash.h prefix.h output.h Makefile
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
-DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
scan-decls.o scan.o libcpp.a $(HOST_LIBS)
fix-header.o: fix-header.c $(srcdir)/../include/obstack.h scan.h \
- xsys-protos.h $(build_xm_file) system.h cpplib.h machmode.h cpphash.h
+ xsys-protos.h $(build_xm_file) system.h cpplib.h cpphash.h
$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/fix-header.c
-scan-decls.o: scan-decls.c scan.h cpplib.h machmode.h $(build_xm_file) system.h
+scan-decls.o: scan-decls.c scan.h cpplib.h $(build_xm_file) system.h
$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan-decls.c
# stmp-fixproto depends on this, not on fix-header directly.
#define MAX_WCHAR_TYPE_SIZE WCHAR_TYPE_SIZE
#endif
-#define MAX_CHAR_TYPE_MASK (MAX_CHAR_TYPE_SIZE < HOST_BITS_PER_WIDE_INT \
- ? (~ (~ (HOST_WIDE_INT) 0 << MAX_CHAR_TYPE_SIZE)) \
- : ~ (HOST_WIDE_INT) 0)
+#define MAX_CHAR_TYPE_MASK (MAX_CHAR_TYPE_SIZE < HOST_BITS_PER_WIDEST_INT \
+ ? (~ (~ (HOST_WIDEST_INT) 0 << MAX_CHAR_TYPE_SIZE)) \
+ : ~ (HOST_WIDEST_INT) 0)
-#define MAX_WCHAR_TYPE_MASK (MAX_WCHAR_TYPE_SIZE < HOST_BITS_PER_WIDE_INT \
- ? ~ (~ (HOST_WIDE_INT) 0 << MAX_WCHAR_TYPE_SIZE) \
- : ~ (HOST_WIDE_INT) 0)
+#define MAX_WCHAR_TYPE_MASK (MAX_WCHAR_TYPE_SIZE < HOST_BITS_PER_WIDEST_INT \
+ ? ~ (~ (HOST_WIDEST_INT) 0 << MAX_WCHAR_TYPE_SIZE) \
+ : ~ (HOST_WIDEST_INT) 0)
/* Yield nonzero if adding two numbers with A's and B's signs can yield a
number with SUM's sign, where A, B, and SUM are all C integers. */
#define SKIP_OPERAND 8
/*#define UNSIGNEDP 16*/
-#ifndef CHAR_BIT
-#define CHAR_BIT 8
-#endif
-
-#ifndef HOST_BITS_PER_WIDE_INT
-#define HOST_BITS_PER_WIDE_INT (CHAR_BIT * sizeof (HOST_WIDE_INT))
-#endif
-
#define SKIP_WHITE_SPACE(p) do { while (is_hor_space[*p]) p++; } while (0)
struct operation {
char rprio; /* Priority of op (relative to it right operand). */
char flags;
char unsignedp; /* true if value should be treated as unsigned */
- HOST_WIDE_INT value; /* The value logically "right" of op. */
+ HOST_WIDEST_INT value; /* The value logically "right" of op. */
};
/* Parse and convert an integer for #if. Accepts decimal, hex, or octal
struct operation op;
U_CHAR *p = start;
int c;
- unsigned HOST_WIDE_INT n = 0, nd, MAX_over_base;
+ unsigned HOST_WIDEST_INT n = 0, nd, MAX_over_base;
int base = 10;
int overflow = 0;
int digit, largest_digit = 0;
}
/* Some buggy compilers (e.g. MPW C) seem to need both casts. */
- MAX_over_base = (((unsigned HOST_WIDE_INT) -1)
- / ((unsigned HOST_WIDE_INT) base));
+ MAX_over_base = (((unsigned HOST_WIDEST_INT) -1)
+ / ((unsigned HOST_WIDEST_INT) base));
while (p < end)
{
cpp_pedwarn (pfile, "integer constant out of range");
/* If too big to be signed, consider it unsigned. */
- else if ((HOST_WIDE_INT) n < 0 && ! op.unsignedp)
+ else if ((HOST_WIDEST_INT) n < 0 && ! op.unsignedp)
{
if (base == 10)
cpp_warning (pfile,
U_CHAR *end;
{
struct operation op;
- HOST_WIDE_INT result = 0;
+ HOST_WIDEST_INT result = 0;
int num_chars = 0;
int num_bits;
unsigned int width = MAX_CHAR_TYPE_SIZE, mask = MAX_CHAR_TYPE_MASK;
If \ is followed by 000, we return 0 and leave the string pointer
after the zeros. A value of 0 does not mean end of string. */
-HOST_WIDE_INT
+HOST_WIDEST_INT
cpp_parse_escape (pfile, string_ptr, result_mask)
cpp_reader *pfile;
char **string_ptr;
- HOST_WIDE_INT result_mask;
+ HOST_WIDEST_INT result_mask;
{
register int c = *(*string_ptr)++;
switch (c)
case '6':
case '7':
{
- register HOST_WIDE_INT i = c - '0';
+ register HOST_WIDEST_INT i = c - '0';
register int count = 0;
while (++count < 3)
{
}
case 'x':
{
- register unsigned HOST_WIDE_INT i = 0, overflow = 0;
+ register unsigned HOST_WIDEST_INT i = 0, overflow = 0;
register int digits_found = 0, digit;
for (;;)
{
/* Parse and evaluate a C expression, reading from PFILE.
Returns the value of the expression. */
-HOST_WIDE_INT
+HOST_WIDEST_INT
cpp_parse_expr (pfile)
cpp_reader *pfile;
{
a single source file bigger than 4GB needs to rethink
their coding style.) */
st_size = (size_t) st.st_size;
- if ((unsigned HOST_WIDE_INT) st_size
- != (unsigned HOST_WIDE_INT) st.st_size)
+ if ((unsigned HOST_WIDEST_INT) st_size
+ != (unsigned HOST_WIDEST_INT) st.st_size)
{
cpp_error (pfile, "file `%s' is too large", ihash->name);
goto fail;
static char *my_strerror PROTO ((int));
static void validate_else PROTO ((cpp_reader *, char *));
-static HOST_WIDE_INT eval_if_expression PROTO ((cpp_reader *));
+static HOST_WIDEST_INT eval_if_expression PROTO ((cpp_reader *));
static void conditional_skip PROTO ((cpp_reader *, int,
enum node_type, U_CHAR *));
/* External declarations. */
-extern HOST_WIDE_INT cpp_parse_expr PARAMS ((cpp_reader *));
+extern HOST_WIDEST_INT cpp_parse_expr PARAMS ((cpp_reader *));
/* `struct directive' defines one #-directive, including how to handle it. */
cpp_reader *pfile;
struct directive *keyword ATTRIBUTE_UNUSED;
{
- HOST_WIDE_INT value = eval_if_expression (pfile);
+ HOST_WIDEST_INT value = eval_if_expression (pfile);
conditional_skip (pfile, value == 0, T_IF, NULL_PTR);
return 0;
}
if (pfile->if_stack->if_succeeded)
skip_if_group (pfile);
else {
- HOST_WIDE_INT value = eval_if_expression (pfile);
+ HOST_WIDEST_INT value = eval_if_expression (pfile);
if (value == 0)
skip_if_group (pfile);
else {
* then parse the result as a C expression and return the value as an int.
*/
-static HOST_WIDE_INT
+static HOST_WIDEST_INT
eval_if_expression (pfile)
cpp_reader *pfile;
{
- HOST_WIDE_INT value;
+ HOST_WIDEST_INT value;
long old_written = CPP_WRITTEN (pfile);
pfile->pcp_inside_if = 1;
};
typedef struct if_stack IF_STACK_FRAME;
-/* Find the largest host integer type and set its size and type.
- Watch out: on some crazy hosts `long' is shorter than `int'. */
-
-#ifndef HOST_WIDE_INT
-#include "machmode.h"
-#endif
-
extern void cpp_buf_line_and_col PARAMS((cpp_buffer *, long *, long *));
extern cpp_buffer* cpp_file_buffer PARAMS((cpp_reader *));
extern void cpp_define PARAMS ((cpp_reader *, unsigned char *));
extern void v_cpp_message PROTO ((cpp_reader *, int, const char *, va_list));
extern void cpp_grow_buffer PARAMS ((cpp_reader *, long));
-extern HOST_WIDE_INT cpp_parse_escape PARAMS ((cpp_reader *, char **, HOST_WIDE_INT));
+extern HOST_WIDEST_INT cpp_parse_escape PARAMS ((cpp_reader *, char **, HOST_WIDEST_INT));
extern cpp_buffer *cpp_push_buffer PARAMS ((cpp_reader *,
unsigned char *, long));
extern cpp_buffer *cpp_pop_buffer PARAMS ((cpp_reader *));