From 997d68fef349f244932d14a82f06cbfe26e344f6 Mon Sep 17 00:00:00 2001 From: law Date: Sat, 4 Apr 1998 13:32:39 +0000 Subject: * Check in merge from gcc2. See ChangeLog.11 and ChangeLog.12 for details. * haifa-sched.c: Mirror recent changes from gcc2. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@18984 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/enquire.c | 49 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 35 insertions(+), 14 deletions(-) (limited to 'gcc/enquire.c') diff --git a/gcc/enquire.c b/gcc/enquire.c index e8adb038c0d..bb5ea0be604 100644 --- a/gcc/enquire.c +++ b/gcc/enquire.c @@ -1412,21 +1412,42 @@ int cprop() { c=0; char_max=0; c++; - if (setjmp(lab)==0) { /* Yields char_max */ - while (c>char_max) { - char_max=c; - c++; - } + if (bits_per_byte <= 16) { + if (setjmp(lab)==0) { /* Yields char_max */ + while (c>char_max) { + char_max=c; + c++; + } + } else { + Vprintf("%sCharacter overflow generates a trap!%s\n", + co, oc); + } + c=0; char_min=0; + c--; + if (setjmp(lab)==0) { /* Yields char_min */ + while (c char_max) + char_max = ~0; + c = 0; + char_min = 0; + c--; + if (c < char_min) { + c = (1 << (bits_per_byte - 1)) - 1; + c = -c; + char_min = c; + c--; + if (c < char_min) + char_min = c; + } } if (c_signed && char_min == 0) { Vprintf("%sBEWARE! Chars are pseudo-unsigned:%s\n", co, oc); -- cgit v1.2.1