3.0 20010305 (prerelease) gen-num-limits.cc compile failure o n alpha-dec-osf4.0e

Rainer Orth ro@TechFak.Uni-Bielefeld.DE
Fri Mar 9 04:56:00 GMT 2001


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



More information about the Libstdc++ mailing list