summaryrefslogtreecommitdiff
path: root/gcc/cppexp.c
diff options
context:
space:
mode:
authorbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>1995-03-22 01:05:16 +0000
committerbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>1995-03-22 01:05:16 +0000
commit21147bdbbb3ec8285e54ea73e907df420e530dce (patch)
treeb11ef8f8bd1f4c82baf9381081d2989b90049773 /gcc/cppexp.c
parentf36e63d8c3d9a4ef51b3ae3220ce27faca8910cf (diff)
downloadgcc-21147bdbbb3ec8285e54ea73e907df420e530dce.tar.gz
Merged in earlier cccp.c changes.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@9217 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cppexp.c')
-rw-r--r--gcc/cppexp.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/gcc/cppexp.c b/gcc/cppexp.c
index 11fdfdd95eb..80a926989da 100644
--- a/gcc/cppexp.c
+++ b/gcc/cppexp.c
@@ -119,12 +119,24 @@ static long right_shift ();
#define HAVE_VALUE 4
/*#define UNSIGNEDP 8*/
+#ifndef HOST_BITS_PER_WIDE_INT
+
+#if HOST_BITS_PER_LONG > HOST_BITS_PER_INT
+#define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_LONG
+#define HOST_WIDE_INT long
+#else
+#define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_INT
+#define HOST_WIDE_INT int
+#endif
+
+#endif
+
struct operation {
short op;
char rprio; /* Priority of op (relative to it right operand). */
char flags;
char unsignedp; /* true if value should be treated as unsigned */
- long value; /* The value logically "right" of op. */
+ HOST_WIDE_INT value; /* The value logically "right" of op. */
};
/* Take care of parsing a number (anything that starts with a digit).
@@ -641,7 +653,7 @@ right_shift (pfile, a, unsignedp, b)
/* Parse and evaluate a C expression, reading from PFILE.
Returns the value of the expression. */
-long
+HOST_WIDE_INT
cpp_parse_expr (pfile)
cpp_reader *pfile;
{