This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Stop on gen-num-limits failures


Trying to bootstrap a virginal current 3.0 CVS tree on Tru64 UNIX V5.1 with
just

	http://gcc.gnu.org/ml/gcc-patches/2001-05/msg01599.html

applied reminded me that

	http://gcc.gnu.org/ml/gcc-patches/2001-04/msg00320.html

still hasn't been applied, though Richard acked it

	http://gcc.gnu.org/ml/gcc-patches/2001-04/msg00325.html

It is necessary to successfully run libstdc++-v3/src/gen-num-limits on
Tru64 UNIX V5.0 and up, i.e. all versions with 128-bit long double.  Right
now (i.e. without this patch), gen-num-limits will crash with a SEGV, but
mknumeric_limits doesn't notice and leaves the incomplete
include/bits/std_limits.h file around, which ends like this:

        static long double denorm_min() throw()
        { return static_cast<long double>(0); }

        static const bool is_iec559 = false;
        static const bool is_bounded = true;
        static const bool is_modulo = false;

} // namespace std

#endif // _CPP_NUMERIC_LIMITS

This leads to a compilation failure later:

/vol/gcc/obj/gcc-3.0-20010522/5.1-adu-cc-dist/gcc/xgcc -B/vol/gcc/obj/gcc-3.0-20010522/5.1-adu-cc-dist/gcc/ -nostdinc++ -L/vol/gcc/obj/gcc-3.0-20010522/5.1-adu-cc-dist/alpha-dec-osf5.1/libstdc++-v3/src -L/vol/gcc/obj/gcc-3.0-20010522/5.1-adu-cc-dist/alpha-dec-osf5.1/libstdc++-v3/src/.libs -B/vol/gcc/alpha-dec-osf5.1/bin/ -B/vol/gcc/alpha-dec-osf5.1/lib/ -isystem /vol/gcc/alpha-dec-osf5.1/include -nostdinc++ -I/vol/gnu/src/gcc/gcc-3.0-branch-dist/libstdc++-v3/include -I/vol/gnu/src/gcc/gcc-3.0-branch-dist/libstdc++-v3/include/std -I/vol/gnu/src/gcc/gcc-3.0-branch-dist/libstdc++-v3/include/c_std -I../include -I/vol/gnu/src/gcc/gcc-3.0-branch-dist/libstdc++-v3/libsupc++ -I../libio -I/vol/gnu/src/gcc/gcc-3.0-branch-dist/libstdc++-v3/libio -I/vol/gnu/src/gcc/gcc-3.0-branch-dist/libstdc++-v3/libmath -g -O2 -mieee -fno-implicit-templates -Wall -Wno-format -W -Wwrite-strings -Winline -fdiagnostics-show-location=once -g -c /vol/gnu/src/gcc/gcc-3.0-branch-dist/libstdc++-v3/src/stdexce!
pt.cc -o stdexcept.o
limitsMEMBERS.cc:38: semicolon missing after declaration of 
   `std::numeric_limits<long double>'
limitsMEMBERS.cc:38: parse error before `namespace'
limitsMEMBERS.cc:38: ISO C++ forbids defining types within return type
limitsMEMBERS.cc:38: syntax error before `{' token
limitsMEMBERS.cc:335: `const bool std::numeric_limits<long double>::traps' is 
   not a static member of `struct std::numeric_limits<long double>'
limitsMEMBERS.cc:335: uninitialized const `std::numeric_limits<long 
   double>::traps'
limitsMEMBERS.cc:336: `const bool std::numeric_limits<long 
   double>::tinyness_before' is not a static member of `struct 
   std::numeric_limits<long double>'
limitsMEMBERS.cc:336: uninitialized const `std::numeric_limits<long 
   double>::tinyness_before'
limitsMEMBERS.cc:337: `const std::float_round_style std::numeric_limits<long 
   double>::round_style' is not a static member of `struct 
   std::numeric_limits<long double>'
limitsMEMBERS.cc:337: uninitialized const `std::numeric_limits<long 
   double>::round_style'
make[4]: *** [limitsMEMBERS.lo] Error 1

The following patch at least avoids going on if there's a gen-num-limits
execution failure.  Tested by rerunning config.status --recheck in a tree
with the broken gcc/gen-num-limits after removing stamp-limits and
include/bits/std_limits.h.

	Rainer

-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University

Email: ro@TechFak.Uni-Bielefeld.DE


Wed May 23 00:13:32 2001  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	* mknumeric_limits: Stop if gen-num-limits dies.

Index: mknumeric_limits
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/mknumeric_limits,v
retrieving revision 1.8.2.4
diff -u -p -r1.8.2.4 mknumeric_limits
--- mknumeric_limits	2001/05/14 17:12:39	1.8.2.4
+++ mknumeric_limits	2001/05/22 22:21:28
@@ -175,7 +175,10 @@ echo "$CC -I. $CPPFLAGS -I$BUILD_DIR/inc
   exit 1
 }
 
-"$BUILD_DIR/src/gen-num-limits" >> $OUT_H-t
+"$BUILD_DIR/src/gen-num-limits" >> $OUT_H-t || {
+  echo "gen-num-limits failed to execute, exiting."
+  exit 1
+}
 
 cat <<EOF >> $OUT_H-t
 } // namespace std


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]