cpplex.c (cpp_interpret_charconst): Use HOST_WIDE_INT for sign extension.
* cpplex.c (cpp_interpret_charconst): Use HOST_WIDE_INT for sign extension. * gcc.dg/cpp/charconst-2.c: New test. From-SVN: r47286
This commit is contained in:
parent
56101178c8
commit
e1e7d56bf1
|
@ -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.
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
Loading…
Reference in New Issue