[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem compiling DDD-3.3 on Solaris 8/SPARC (and possible fix?)

From: Andreas Zeller
Subject: Re: Problem compiling DDD-3.3 on Solaris 8/SPARC (and possible fix?)
Date: 09 Mar 2001 10:58:10 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley)


Mike Bland <address@hidden> 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 */

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 Zeller     Universitaet Passau

reply via email to

[Prev in Thread] Current Thread [Next in Thread]