summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog13
-rw-r--r--gcc/cpplex.c4
-rw-r--r--gcc/testsuite/ChangeLog16
-rw-r--r--gcc/testsuite/gcc.dg/cpp/charconst-2.c18
4 files changed, 39 insertions, 12 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 02549e6a85e..945a57db0a5 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2001-11-23 Andreas Jaeger <aj@suse.de>
+
+ * cpplex.c (cpp_interpret_charconst): Use HOST_WIDE_INT for sign
+ extension.
+
2001-11-23 Nick Clifton <nickc@cambridge.redhat.com>
* config/arm/xscale-coff.h (SUBTARGET_CPU_DEFAULT): Override
@@ -67,9 +72,9 @@ Thu Nov 22 06:49:14 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* tree-dump.c: Rename from c-dump.c. Include c-tree.h, not c-common.h.
(lang_type_quals): Declare.
- (dequeue_and_dump): Use lang_hooks.tree_dump.type_quals function to
- retrieve language-specific qualifiers for a type node, instead of
- C_TYPE_QUALS. Likewise for lang_hooks.tree_dump.dump_tree instead of
+ (dequeue_and_dump): Use lang_hooks.tree_dump.type_quals function to
+ retrieve language-specific qualifiers for a type node, instead of
+ C_TYPE_QUALS. Likewise for lang_hooks.tree_dump.dump_tree instead of
lang_dump_tree.
* tree-dump.h: Rename from c-dump.h.
* c-common.h (C_TYPE_QUALS): Removed.
@@ -120,7 +125,7 @@ Thu Nov 22 06:49:14 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* v850.h (DBX_REGISTER_NUMBER): Likewise.
* vax.h (DBX_REGISTER_NUMBER): Likewise.
* we32k.h (DBX_REGISTER_NUMBER): Likewise.
-
+
* defaults.h (DBX_REGISTER_NUMBER): Provide a default.
* doc/tm.texi (DBX_REGISTER_NUMBER): Update.
diff --git a/gcc/cpplex.c b/gcc/cpplex.c
index 924863f1fca..35411e615c1 100644
--- a/gcc/cpplex.c
+++ b/gcc/cpplex.c
@@ -1,5 +1,5 @@
/* CPP Library - lexical analysis.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001 Free Software Foundation, Inc.
Contributed by Per Bothner, 1994-95.
Based on CCCP program by Paul Rubin, June 1986
Adapted to ANSI C, Richard Stallman, Jan 1987
@@ -1922,8 +1922,8 @@ cpp_interpret_charconst (pfile, token, warn_multi, traditional, pchars_seen)
if (token->type == CPP_CHAR && chars_seen)
{
unsigned int nbits = chars_seen * width;
- unsigned int mask = (unsigned int) ~0 >> (HOST_BITS_PER_INT - nbits);
+ mask = (unsigned HOST_WIDE_INT) ~0 >> (HOST_BITS_PER_WIDE_INT - nbits);
if (pfile->spec_nodes.n__CHAR_UNSIGNED__->type == NT_MACRO
|| ((result >> (nbits - 1)) & 1) == 0)
result &= mask;
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index ac3dfc0758c..5105842bcbc 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2001-11-23 Andreas Jaeger <aj@suse.de>
+
+ * gcc.dg/cpp/charconst-2.c: New test.
+
2001-11-22 Geoffrey Keating <geoffk@redhat.com>
* lib/old-dejagnu.exp (old-dejagnu): Copy extra source files
@@ -340,7 +344,7 @@ Mon Oct 29 21:19:53 2001 Nicola Pero <n.pero@mi.flashnet.it>
2001-09-27 Geoffrey Keating <geoffk@redhat.com>
* gcc.c-torture/execute/loop-2e.x: This is a manifestation of a
- long-standing bug on i686, apparently.
+ long-standing bug on i686, apparently.
* gcc.c-torture/execute/loop-2c.x: New file.
* gcc.c-torture/execute/loop-2d.x: New file.
* gcc.c-torture/execute/loop-3c.x: New file.
@@ -360,7 +364,7 @@ Mon Oct 29 21:19:53 2001 Nicola Pero <n.pero@mi.flashnet.it>
2001-09-24 DJ Delorie <dj@redhat.com>
* gcc.c-torture/execute/20010924-1.c: New test.
-
+
2001-09-24 Neil Booth <neil@daikokuya.demon.co.uk>
* testsuite/objc/execute/paste.m: Remove.
@@ -408,7 +412,7 @@ Mon Oct 29 21:19:53 2001 Nicola Pero <n.pero@mi.flashnet.it>
2001-09-15 Aldy Hernandez <aldyh@redhat.com>
- * gcc.c-torture/execute/980223.c: Change type of addr from long
+ * gcc.c-torture/execute/980223.c: Change type of addr from long
to char *.
2001-09-15 Hans-Peter Nilsson <hp@axis.com>
@@ -474,7 +478,7 @@ Mon Oct 29 21:19:53 2001 Nicola Pero <n.pero@mi.flashnet.it>
2001-09-05 Ziemowit Laski <zlaski@apple.com>
* objc.dg/method-2.m: New.
-
+
2001-09-04 Nathan Sidwell <nathan@codesourcery.com>
PR c++/4203
@@ -566,8 +570,8 @@ Mon Oct 29 21:19:53 2001 Nicola Pero <n.pero@mi.flashnet.it>
2001-08-14 David Billinghurst <David.Billinghurst@riotinto.com>
* lib/g77-dg.exp: Use prune.exp for common procedures
- (g77-dg-prune): Replace prune_g77_output with prune_gcc_output
- * lib/g77.exp: (g77-dg-prune) Remove
+ (g77-dg-prune): Replace prune_g77_output with prune_gcc_output
+ * lib/g77.exp: (g77-dg-prune) Remove
2001-08-13 Jason Merrill <jason_merrill@redhat.com>
diff --git a/gcc/testsuite/gcc.dg/cpp/charconst-2.c b/gcc/testsuite/gcc.dg/cpp/charconst-2.c
new file mode 100644
index 00000000000..7ee0cfb65ca
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/charconst-2.c
@@ -0,0 +1,18 @@
+/* Copyright (C) 2001 Free Software Foundation, Inc. */
+
+/* { dg-do compile } */
+
+/* Crosscompiling from i686-linux (32-bit) to x86_64-linux (64-bit)
+ gave extra warnings on the two assignments:
+ warning: large integer implicitly truncated to unsigned type
+ warning: overflow in implicit constant conversion
+ This test has been added as a regression test after fixing the bug
+ by Andreas Jaeger, 23 Nov 2001. */
+int
+main (void)
+{
+ signed char c = '\xff';
+ unsigned char d = '\xff';
+
+ return 0;
+}