This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Problem compiling DDD-3.3 on Solaris 8/SPARC (and possible fix?)
- To: Mike Bland <mbland at pcs dot cnu dot edu>
- Subject: Re: Problem compiling DDD-3.3 on Solaris 8/SPARC (and possible fix?)
- From: Andreas Zeller <andreas dot zeller at fmi dot uni-passau dot de>
- Date: 09 Mar 2001 10:58:10 +0100
- Cc: DDD Bug Reports <bug-ddd at gnu dot org>,GNU GCC Bug List <bug-gcc at gnu dot org>
- References: <Pine.LNX.4.10.10103080846440.473-100000@localhost.localdomain>
Hi!
Mike Bland <mbland@pcs.cnu.edu> writes:
> Since this is a compile-time problem, please forgive my exclusion of DDD
> configuration/log information. Here is the vital info:
>
> DDD version: 3.3
> OS: Solaris 8
> Arch: sparcv9
> g++ version: 2.95.2 19991024
>
> A transcript of the compiler output follows. In the file SourceView.C,
> I'm getting errors for two lines of code which are both identical to:
>
> next_l = ULONG_MAX;
>
> The g++ warning/error messages are:
>
> integer constant out of range
> warning: decimal integer constant is so large that it is unsigned
>
> The two instances appear in:
>
> static bool SourceView::function_is_larger_than(string, int)
> static void SourceView::show_pc(const string &, XmHighlightMode =
> XmHIGHLIGHT_NORMAL, bool = false, bool = false)
>
> I suspect this is because the 64-bit ULONG_MAX goes far beyond the 32-bit
> unsigned long that g++ is capable of producing.
Hmmm - normally, ULONG_MAX should fit into an `unsigned long' without
any problems. I have cc'ed this reply to the GCC maintainers.
The `official' workaround is already in the source file:
#ifndef ULONG_MAX
#define ULONG_MAX ((unsigned long)(~0L)) /* 0xFFFFFFFF */
#endif
This should work on most, if not all, architectures. If the problem
persists with future GCC releases, I'll make the DDD `configure'
script check for it.
Best wishes,
Andreas
--
Andreas Zeller Universitaet Passau
http://www.fmi.uni-passau.de/st/staff/zeller/