bug-ddd
[Top][All Lists]
Advanced

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

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


From: Mike Bland
Subject: Problem compiling DDD-3.3 on Solaris 8/SPARC (and possible fix?)
Date: Fri, 9 Mar 2001 01:18:37 -0500 (EST)

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.

I've managed to get around this by changing the above lines to:

        next_l = static_cast<unsigned long>(-1);

This seems to have the same net effect--I think.  It compiles fine with
this alteration.  Please let me know if this will have some horrendous
side effect.  Either way, I figured it was worth sending in.

Incidentally, I tried compiling it with Sun CC, version Sun WorkShop 6
update 1 C++ 5.2 2000/09/11, but the finished executable kept segfaulting,
and I don't feel qualified to track that one down yet (nor do I have the
time right now).  In order to get it to build in the first place, though,
I had to deal with some constness problem in MString.h, which I kludged
my way through; the transcript of those error messages follows the
transcript for the aforementioned SourceView.C problem.

Thanks,

Mike Bland
address@hidden

-------------------------------------------------------------------------

SourceView.C messages (g++):

/usr/local/gnu/bin/g++ -DHAVE_CONFIG_H -I. -I. -I. -I./.. -isystem
/usr/openwin/include  -I/usr/local/gnu/include -I/usr/local/include
-DNDEBUG -O3  -W -Wall -s -pipe -mcpu=ultrasparc -fomit-frame-pointer
-I/usr/local/gnu/include -I/usr/local/include  -trigraphs  -c SourceView.C

SourceView.C: In function `static bool
SourceView::function_is_larger_than(string, int)':
SourceView.C:9497: integer constant out of range
SourceView.C:9497: warning: decimal integer constant is so large that it
is unsigned

SourceView.C: In function `static void SourceView::show_pc(const string &,
XmHighlightMode = XmHIGHLIGHT_NORMAL, bool = false, bool = false)':
SourceView.C:9577: integer constant out of range
SourceView.C:9577: warning: decimal integer constant is so large that it
is unsigned

make[1]: *** [SourceView.o] Error 1
make[1]: Leaving directory `/home/staff/sysapp1/src/gnu/ddd-3.3/ddd'
make: *** [all-recursive] Error 1

-------------------------------------------------------------------------

MString.h problem (Sun CC):

/usr/local/forte/SUNWspro/WS6U1/bin/CC -DHAVE_CONFIG_H -I. -I. -I. -I./..
-I/usr/openwin/include -I/usr/local/gnu/include -DNDEBUG -xs -s -fast
-native -L/us r/local/gnu/lib -I/usr/local/gnu/include  -I/usr/local/include
-c ddd.C

CC: Warning: -xarch=native has been explicitly specified, or implicitly
specified by a macro option, -xarch=native on this architecture implies
-xarch=v8plusa which generates code that does not run on pre-UltraSPARC
processors

"MString.h", line 57: Error: Formal argument text of type char* in call to
XmStringCreateLtoR(char*, char*) is being passed const char*.

"MString.h", line 57: Error: Cannot use int to initialize __XmStringRec*.

"ddd.C", line 6874: Warning (Anachronism): Formal argument 3 of type
extern "C" int(*)(_XDisplay*,_XEvent*,char*) in call to
XCheckIfEvent(_XDisplay*, _XEvent*, extern "C"
int(*)(_XDisplay*,_XEvent*,char*), char*) is being passed
int(*)(_XDisplay*,_XEvent*,char*).

2 Error(s) and 1 Warning(s) detected.
*** Error code 2
make: Fatal error: Command failed for target `ddd.o'
Current working directory /home/staff/sysapp1/src/gnu/ddd-3.3/ddd
*** Error code 1
make: Fatal error: Command failed for target `all-recursive'




reply via email to

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