This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: New boost regressions since yesterday for gcc 3.0.1
- To: Gabriel Dos Reis <gdr at codesourcery dot com>
- Subject: Re: New boost regressions since yesterday for gcc 3.0.1
- From: Peter Schmid <schmid at snake dot iap dot physik dot tu-darmstadt dot de>
- Date: Wed, 15 Aug 2001 01:40:51 +0200 (CEST)
- cc: gcc at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org, mark at codesourcery dot com
On 14 Aug 2001, Gabriel Dos Reis wrote:
> Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de> writes:
>
> [...]
>
> | following testcase tp.C. Since chars are signed on linux, I expect
>
> Actually, the bug is plateform independent and fixed by the below --
> silly of me. Mark, I think this should on the branch as well. Applied
> to mainline. I'll check in a full testcase later.
>
> -- Gaby
> CodeSourcery, LLC http://www.codesourcery.com
>
> Index: ChangeLog
> ===================================================================
> RCS file: /cvs/gcc/egcs/libstdc++-v3/ChangeLog,v
> retrieving revision 1.739
> diff -p -r1.739 ChangeLog
> *** ChangeLog 2001/08/13 12:59:38 1.739
> --- ChangeLog 2001/08/14 21:01:22
> ***************
> *** 1,3 ****
> --- 1,7 ----
> + 2001-08-14 Gabriel Dos Reis <gdr@codesourcery.com>
> +
> + * include/bits/std_limits.h: Fix thinko.
> +
> 2001-08-13 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
>
> * include/bits/ostream.tcc (__pad_char): Change toplevel '__fmt'
> Index: include/bits/std_limits.h
> ===================================================================
> RCS file: /cvs/gcc/egcs/libstdc++-v3/include/bits/std_limits.h,v
> retrieving revision 1.2
> diff -p -r1.2 std_limits.h
> *** std_limits.h 2001/08/11 08:36:52 1.2
> --- std_limits.h 2001/08/14 21:01:23
> ***************
> *** 77,83 ****
> #ifndef __glibcpp_char_bits
> #define __glibcpp_char_bits 8
> #endif
> ! #ifndef __CHAR_UNSIGNED__
> #define __glibcpp_plain_char_is_signed false
> #else
> #define __glibcpp_plain_char_is_signed true
> --- 77,83 ----
> #ifndef __glibcpp_char_bits
> #define __glibcpp_char_bits 8
> #endif
> ! #ifdef __CHAR_UNSIGNED__
> #define __glibcpp_plain_char_is_signed false
> #else
> #define __glibcpp_plain_char_is_signed true
>
>
After applying your patch all test cases of
../libs/integer/integer_traits_test.cpp pass, except for the following
test case tps.C. std::numeric_limits<signed char>::min() and
std::numeric_limits<signed char>::min() both return the same value, \200,
which is -128, equivalent to CHAR_MIN.
Thank you for fixing the previous problem. Could you please fix this
problem also.
Hope this helps.
Peter Schmid
#include <iostream>
#include <limits>
#include <limits.h>
int main()
{
std::cout << "limit.h" << std::endl;
std::cout << "Checking " << "unsigned char"
<< "; min is " << CHAR_MIN
<< ", max is " << CHAR_MAX
<< std::endl;
std::cout << "limit" <<std::endl;
std::cout << "Checking " << "unsigned char"
<< "; min is " << std::numeric_limits<signed char>::min()
<< ", max is " << std::numeric_limits<signed char>::max()
<< std::endl;
}
Compiling tps.C
g++ -v -o tps tps.C -W -Wall
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/specs
Configured with: ../gcc/configure --enable-shared --enable-threads=posix --enable-languages=c,c++,f77,objc --disable-nls --enable-clocale=gnu
Thread model: posix
gcc version 3.0.1 20010814 (prerelease)
/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/cc1plus -v -D__GNUC__=3 -D__GNUC_MINOR__=0 -D__GNUC_PATCHLEVEL__=1 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem=posix -D__NO_INLINE__ -D__STDC_HOSTED__=1 -W -Wall -D_GNU_SOURCE -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ tps.C -D__GNUG__=3 -D__GXX_DEPRECATED -D__EXCEPTIONS -D__GXX_ABI_VERSION=100 -quiet -dumpbase tps.C -W -Wall -version -o /tmp/ccHrp1cC.s
GNU CPP version 3.0.1 20010814 (prerelease) (cpplib) (i386 Linux/ELF)
GNU C++ version 3.0.1 20010814 (prerelease) (i686-pc-linux-gnu)
compiled by GNU C version 3.0.1 20010814 (prerelease).
ignoring nonexistent directory "/usr/local/i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include/g++-v3
/usr/local/include/g++-v3/i686-pc-linux-gnu
/usr/local/include/g++-v3/backward
/usr/local/include
/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/include
/usr/include
End of search list.
/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/../../../../i686-pc-linux-gnu/bin/as -V -Qy -o /tmp/cc8XunbJ.o /tmp/ccHrp1cC.s
GNU assembler version 2.11.90.0.23 (i686-pc-linux-gnu) using BFD version 2.11.90.0.23
/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/collect2 -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o tps /usr/lib/crt1.o /usr/lib/crti.o /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/crtbegin.o -L/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0.1 -L/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/../../../../i686-pc-linux-gnu/lib -L/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/../../.. /tmp/cc8XunbJ.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/crtend.o /usr/lib/crtn.o
Running tps
./tps
limit.h
Checking unsigned char; min is -128, max is 127
limit
Checking unsigned char; min is \200, max is \200