Commit e915b770 by Kaveh R. Ghazi Committed by Kaveh Ghazi

Makefile.in (cppmain.o, [...]): Don't depend on machmode.h.

        * 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.

From-SVN: r25446
parent 056cd572
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> Thu Feb 25 18:46:26 1999 Richard Henderson <rth@cygnus.com>
* gcc.c (default_compilers): Define __FAST_MATH__ when appropriate. * gcc.c (default_compilers): Define __FAST_MATH__ when appropriate.
......
...@@ -1968,17 +1968,17 @@ cppmain$(exeext): cppmain.o libcpp.a $(LIBDEPS) ...@@ -1968,17 +1968,17 @@ cppmain$(exeext): cppmain.o libcpp.a $(LIBDEPS)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cppmain$(exeext) cppmain.o \ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cppmain$(exeext) cppmain.o \
libcpp.a $(LIBS) 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 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 cpplib.o: cpplib.c $(CONFIG_H) cpplib.h intl.h system.h cpphash.h
cpphash.o: cpphash.c $(CONFIG_H) cpplib.h intl.h machmode.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 machmode.h system.h cppalloc.o: cppalloc.c $(CONFIG_H) cpplib.h intl.h system.h
cpperror.o: cpperror.c $(CONFIG_H) cpplib.h intl.h machmode.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 machmode.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 machmode.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 machmode.h system.h \ cppinit.o: cppalloc.c $(CONFIG_H) cpplib.h intl.h system.h \
cpphash.h prefix.h output.h Makefile cpphash.h prefix.h output.h Makefile
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
-DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \ -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
...@@ -2193,10 +2193,10 @@ fix-header: fix-header.o scan-decls.o scan.o xsys-protos.h $(HOST_LIBDEPS) \ ...@@ -2193,10 +2193,10 @@ fix-header: fix-header.o scan-decls.o scan.o xsys-protos.h $(HOST_LIBDEPS) \
scan-decls.o scan.o libcpp.a $(HOST_LIBS) scan-decls.o scan.o libcpp.a $(HOST_LIBS)
fix-header.o: fix-header.c $(srcdir)/../include/obstack.h scan.h \ 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 $(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 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan-decls.c
# stmp-fixproto depends on this, not on fix-header directly. # stmp-fixproto depends on this, not on fix-header directly.
......
...@@ -64,13 +64,13 @@ Written by Per Bothner 1994. */ ...@@ -64,13 +64,13 @@ Written by Per Bothner 1994. */
#define MAX_WCHAR_TYPE_SIZE WCHAR_TYPE_SIZE #define MAX_WCHAR_TYPE_SIZE WCHAR_TYPE_SIZE
#endif #endif
#define MAX_CHAR_TYPE_MASK (MAX_CHAR_TYPE_SIZE < HOST_BITS_PER_WIDE_INT \ #define MAX_CHAR_TYPE_MASK (MAX_CHAR_TYPE_SIZE < HOST_BITS_PER_WIDEST_INT \
? (~ (~ (HOST_WIDE_INT) 0 << MAX_CHAR_TYPE_SIZE)) \ ? (~ (~ (HOST_WIDEST_INT) 0 << MAX_CHAR_TYPE_SIZE)) \
: ~ (HOST_WIDE_INT) 0) : ~ (HOST_WIDEST_INT) 0)
#define MAX_WCHAR_TYPE_MASK (MAX_WCHAR_TYPE_SIZE < HOST_BITS_PER_WIDE_INT \ #define MAX_WCHAR_TYPE_MASK (MAX_WCHAR_TYPE_SIZE < HOST_BITS_PER_WIDEST_INT \
? ~ (~ (HOST_WIDE_INT) 0 << MAX_WCHAR_TYPE_SIZE) \ ? ~ (~ (HOST_WIDEST_INT) 0 << MAX_WCHAR_TYPE_SIZE) \
: ~ (HOST_WIDE_INT) 0) : ~ (HOST_WIDEST_INT) 0)
/* Yield nonzero if adding two numbers with A's and B's signs can yield a /* 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. */ number with SUM's sign, where A, B, and SUM are all C integers. */
...@@ -101,14 +101,6 @@ static long right_shift PARAMS ((cpp_reader *, long, int, unsigned long)); ...@@ -101,14 +101,6 @@ static long right_shift PARAMS ((cpp_reader *, long, int, unsigned long));
#define SKIP_OPERAND 8 #define SKIP_OPERAND 8
/*#define UNSIGNEDP 16*/ /*#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) #define SKIP_WHITE_SPACE(p) do { while (is_hor_space[*p]) p++; } while (0)
struct operation { struct operation {
...@@ -116,7 +108,7 @@ struct operation { ...@@ -116,7 +108,7 @@ struct operation {
char rprio; /* Priority of op (relative to it right operand). */ char rprio; /* Priority of op (relative to it right operand). */
char flags; char flags;
char unsignedp; /* true if value should be treated as unsigned */ 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 /* Parse and convert an integer for #if. Accepts decimal, hex, or octal
...@@ -131,7 +123,7 @@ parse_number (pfile, start, end) ...@@ -131,7 +123,7 @@ parse_number (pfile, start, end)
struct operation op; struct operation op;
U_CHAR *p = start; U_CHAR *p = start;
int c; 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 base = 10;
int overflow = 0; int overflow = 0;
int digit, largest_digit = 0; int digit, largest_digit = 0;
...@@ -154,8 +146,8 @@ parse_number (pfile, start, end) ...@@ -154,8 +146,8 @@ parse_number (pfile, start, end)
} }
/* Some buggy compilers (e.g. MPW C) seem to need both casts. */ /* Some buggy compilers (e.g. MPW C) seem to need both casts. */
MAX_over_base = (((unsigned HOST_WIDE_INT) -1) MAX_over_base = (((unsigned HOST_WIDEST_INT) -1)
/ ((unsigned HOST_WIDE_INT) base)); / ((unsigned HOST_WIDEST_INT) base));
while (p < end) while (p < end)
{ {
...@@ -229,7 +221,7 @@ parse_number (pfile, start, end) ...@@ -229,7 +221,7 @@ parse_number (pfile, start, end)
cpp_pedwarn (pfile, "integer constant out of range"); cpp_pedwarn (pfile, "integer constant out of range");
/* If too big to be signed, consider it unsigned. */ /* 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) if (base == 10)
cpp_warning (pfile, cpp_warning (pfile,
...@@ -255,7 +247,7 @@ parse_charconst (pfile, start, end) ...@@ -255,7 +247,7 @@ parse_charconst (pfile, start, end)
U_CHAR *end; U_CHAR *end;
{ {
struct operation op; struct operation op;
HOST_WIDE_INT result = 0; HOST_WIDEST_INT result = 0;
int num_chars = 0; int num_chars = 0;
int num_bits; int num_bits;
unsigned int width = MAX_CHAR_TYPE_SIZE, mask = MAX_CHAR_TYPE_MASK; unsigned int width = MAX_CHAR_TYPE_SIZE, mask = MAX_CHAR_TYPE_MASK;
...@@ -521,11 +513,11 @@ cpp_lex (pfile, skip_evaluation) ...@@ -521,11 +513,11 @@ cpp_lex (pfile, skip_evaluation)
If \ is followed by 000, we return 0 and leave the string pointer 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. */ 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_parse_escape (pfile, string_ptr, result_mask)
cpp_reader *pfile; cpp_reader *pfile;
char **string_ptr; char **string_ptr;
HOST_WIDE_INT result_mask; HOST_WIDEST_INT result_mask;
{ {
register int c = *(*string_ptr)++; register int c = *(*string_ptr)++;
switch (c) switch (c)
...@@ -564,7 +556,7 @@ cpp_parse_escape (pfile, string_ptr, result_mask) ...@@ -564,7 +556,7 @@ cpp_parse_escape (pfile, string_ptr, result_mask)
case '6': case '6':
case '7': case '7':
{ {
register HOST_WIDE_INT i = c - '0'; register HOST_WIDEST_INT i = c - '0';
register int count = 0; register int count = 0;
while (++count < 3) while (++count < 3)
{ {
...@@ -586,7 +578,7 @@ cpp_parse_escape (pfile, string_ptr, result_mask) ...@@ -586,7 +578,7 @@ cpp_parse_escape (pfile, string_ptr, result_mask)
} }
case 'x': 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; register int digits_found = 0, digit;
for (;;) for (;;)
{ {
...@@ -692,7 +684,7 @@ right_shift (pfile, a, unsignedp, b) ...@@ -692,7 +684,7 @@ right_shift (pfile, a, unsignedp, b)
/* Parse and evaluate a C expression, reading from PFILE. /* Parse and evaluate a C expression, reading from PFILE.
Returns the value of the expression. */ Returns the value of the expression. */
HOST_WIDE_INT HOST_WIDEST_INT
cpp_parse_expr (pfile) cpp_parse_expr (pfile)
cpp_reader *pfile; cpp_reader *pfile;
{ {
......
...@@ -705,8 +705,8 @@ finclude (pfile, fd, ihash) ...@@ -705,8 +705,8 @@ finclude (pfile, fd, ihash)
a single source file bigger than 4GB needs to rethink a single source file bigger than 4GB needs to rethink
their coding style.) */ their coding style.) */
st_size = (size_t) st.st_size; st_size = (size_t) st.st_size;
if ((unsigned HOST_WIDE_INT) st_size if ((unsigned HOST_WIDEST_INT) st_size
!= (unsigned HOST_WIDE_INT) st.st_size) != (unsigned HOST_WIDEST_INT) st.st_size)
{ {
cpp_error (pfile, "file `%s' is too large", ihash->name); cpp_error (pfile, "file `%s' is too large", ihash->name);
goto fail; goto fail;
......
...@@ -55,7 +55,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ...@@ -55,7 +55,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
static char *my_strerror PROTO ((int)); static char *my_strerror PROTO ((int));
static void validate_else PROTO ((cpp_reader *, char *)); 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, static void conditional_skip PROTO ((cpp_reader *, int,
enum node_type, U_CHAR *)); enum node_type, U_CHAR *));
...@@ -64,7 +64,7 @@ static int parse_name PARAMS ((cpp_reader *, int)); ...@@ -64,7 +64,7 @@ static int parse_name PARAMS ((cpp_reader *, int));
/* External declarations. */ /* 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. */ /* `struct directive' defines one #-directive, including how to handle it. */
...@@ -1595,7 +1595,7 @@ do_if (pfile, keyword) ...@@ -1595,7 +1595,7 @@ do_if (pfile, keyword)
cpp_reader *pfile; cpp_reader *pfile;
struct directive *keyword ATTRIBUTE_UNUSED; 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); conditional_skip (pfile, value == 0, T_IF, NULL_PTR);
return 0; return 0;
} }
...@@ -1631,7 +1631,7 @@ do_elif (pfile, keyword) ...@@ -1631,7 +1631,7 @@ do_elif (pfile, keyword)
if (pfile->if_stack->if_succeeded) if (pfile->if_stack->if_succeeded)
skip_if_group (pfile); skip_if_group (pfile);
else { else {
HOST_WIDE_INT value = eval_if_expression (pfile); HOST_WIDEST_INT value = eval_if_expression (pfile);
if (value == 0) if (value == 0)
skip_if_group (pfile); skip_if_group (pfile);
else { else {
...@@ -1647,11 +1647,11 @@ do_elif (pfile, keyword) ...@@ -1647,11 +1647,11 @@ do_elif (pfile, keyword)
* then parse the result as a C expression and return the value as an int. * 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) eval_if_expression (pfile)
cpp_reader *pfile; cpp_reader *pfile;
{ {
HOST_WIDE_INT value; HOST_WIDEST_INT value;
long old_written = CPP_WRITTEN (pfile); long old_written = CPP_WRITTEN (pfile);
pfile->pcp_inside_if = 1; pfile->pcp_inside_if = 1;
......
...@@ -666,13 +666,6 @@ struct if_stack { ...@@ -666,13 +666,6 @@ struct if_stack {
}; };
typedef struct if_stack IF_STACK_FRAME; 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 void cpp_buf_line_and_col PARAMS((cpp_buffer *, long *, long *));
extern cpp_buffer* cpp_file_buffer PARAMS((cpp_reader *)); extern cpp_buffer* cpp_file_buffer PARAMS((cpp_reader *));
extern void cpp_define PARAMS ((cpp_reader *, unsigned char *)); extern void cpp_define PARAMS ((cpp_reader *, unsigned char *));
...@@ -699,7 +692,7 @@ extern void cpp_perror_with_name PROTO ((cpp_reader *, const char *)); ...@@ -699,7 +692,7 @@ extern void cpp_perror_with_name PROTO ((cpp_reader *, const char *));
extern void v_cpp_message PROTO ((cpp_reader *, int, const char *, va_list)); extern void v_cpp_message PROTO ((cpp_reader *, int, const char *, va_list));
extern void cpp_grow_buffer PARAMS ((cpp_reader *, long)); 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 *, extern cpp_buffer *cpp_push_buffer PARAMS ((cpp_reader *,
unsigned char *, long)); unsigned char *, long));
extern cpp_buffer *cpp_pop_buffer PARAMS ((cpp_reader *)); extern cpp_buffer *cpp_pop_buffer PARAMS ((cpp_reader *));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment