This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: 3.0 20010305 (prerelease) gen-num-limits.cc compile failure o n alpha-dec-osf4.0e
- To: RDBrown at mira dot net, RodneyBrown at mynd dot com
- Subject: Re: 3.0 20010305 (prerelease) gen-num-limits.cc compile failure o n alpha-dec-osf4.0e
- From: Rainer Orth <ro at TechFak dot Uni-Bielefeld dot DE>
- Date: Fri, 9 Mar 2001 13:56:41 +0100 (MET)
- Cc: Rainer Orth <ro at TechFak dot Uni-Bielefeld dot DE>, gcc-bugs at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org, bkorb at gnu dot org
- References: <15015.63386.80975.122199@xayide.TechFak.Uni-Bielefeld.DE><E14bVUO-0000CF-00@urtur>
Rodney,
> On alpha-dec-osf4.0e I hacked up the following. I don't think there was
> a fixincluded standards.h before. That is, on osf4.0e at least I think
> standards.h may need to be fixed.
I've diffed the V4.0E and V4.0F versions of <standards.h>: the affected
area of the header is unchanged between those releases (as well as between
V4.0G and V5.1). During my bootstraps of 3.0 20010221, that header was
fixincluded as follows:
--- /usr/include/standards.h Fri Aug 25 06:20:14 2000
+++ ../gcc-3.0-20010221/gcc/include/standards.h.fixincl Wed Feb 21 23:34:17 2001
@@ -236,7 +245,7 @@
*/
#ifdef __GNUC__
-#if !__STDC__
+#if !defined(__STRICT_ANSI__)
#ifndef _NO_PROTO
#define _NO_PROTO
#endif
and g++ defines __STDC__ as 1, but not __STRICT_ANSI__, so just disabling
this fix gives the right result for both C and C++.
> #ifdef __GNUC__
>
> -#if !__STDC__
> +#if !__STDC__ && !defined(__cplusplus)
> #ifndef _NO_PROTO
> #define _NO_PROTO
That's what I had done manually at first (while keeping the conversion to
__STRICT_ANSI__ instead of __STDC__), but just undoing the fix proved to be
simpler, and just as effective.
Rainer
-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University
Email: ro@TechFak.Uni-Bielefeld.DE