This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: 3.0 20010305 (prerelease) gen-num-limits.cc compile failure o n alpha-dec-osf4.0e
- To: Rainer Orth <ro at TechFak dot Uni-Bielefeld dot DE>
- Subject: Re: 3.0 20010305 (prerelease) gen-num-limits.cc compile failure o n alpha-dec-osf4.0e
- From: RDBrown at mira dot net
- Date: Sat, 10 Mar 2001 09:36:00 +1100 (EST)
- CC: gcc-bugs at gcc dot gnu dot org
- Reply-To: RDBrown at mira dot net,RodneyBrown at mynd dot com
> > This won't do what the comment claims it will do.
> > This will always ignore all files named, "standards.h".
> > The comment says it is for Tru64 UNIX. You must add
> > some selection or bypass criteria to ensure you do not
> > suppress the fixing of standards.h files that need fixes.
> This what the `select' text is for: it's taken from the V4.0F and V5.1
> <standards.h> files on Tru64 UNIX and may be a better criterion than some
> Digital Equipment copyright (which may well change to Compaq in the
> future). Another option might be a
> mach = alpha*-dec-osf*;
> clause, but this might not hold for older (or newer) Tru64 releases.
> > > +fix = {
> > > + hackname = AAA_standards;
> > > + files = standards.h;
> > > + select = 'GNU and MIPS C compilers define __STDC__
> > > differently';
> > > + replace; /* empty replacement -> no fixing the file */
> > > +};
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.
--- /usr/include/standards.h Sat Nov 14 07:19:49 1998
+++ /user/rand/rdb/src/gcc-20010305.obj/gcc/include/standards.h Wed Mar 7 12:19:16 2001
/* automation for non ANSI compilers */
/*
* GNU and MIPS C compilers define __STDC__ differently.
* MIPS: -std0 = undefined, -std = 0, -std1 = 1
* GNU: -traditional = undefined, otherwise = 1
*/
#ifdef __GNUC__
-#if !__STDC__
+#if !__STDC__ && !defined(__cplusplus)
#ifndef _NO_PROTO
#define _NO_PROTO
#endif
#ifndef _NONSTD_TYPES
#define _NONSTD_TYPES
#endif
#endif
#else /* !__GNUC__ */
#if !defined(__STDC__) && !defined(__cplusplus)
Maybe
#if __GNUC__ < 3 || (!__STDC__ && !defined(__cplusplus))
would be a better fix if it is needed.