Jean-Marc Lasgouttes wrote:

> Michael> The putenv() problem is also fixed. There are are still some
> Michael> other error messages (e.g. the signed/unsigned problem with
> Michael> 'pair'). However, meanwhile I am skilled in patching the code
> Michael> and since no new problems have raised I can live with the
> Michael> situation for the moment.
> 
> I do not know how to fix this signed/unsigned problem _cleanly_, since
> it seems to be a bug of CC 5.0 and we can't workaround all bugs on a
> ad hoc manner.

Well, the big question is: Does ANSI C++ interpret "signed int" and
"unsigned int" as different data types when used in a template such as
pair? I think the question whether Sun CC is faulty or all other
compilers are just a little bit to generous can only be decided if
someone looks into the official ANSI C++ standard. Unfortunately, I do
not have access to it and all C++ books available are simply too vague
to decide this question.

I solved the problem by applying a static_cast. E.g.

  return make_pair(true, static_cast<unsigned>(LYX_DUMMY_LAYOUT));  

Even if a compiler does not care about whether LYX_DUMMY_LAYOUT is
signed or unsigned, it should swallow the statement above, shouldn't it?
Alternative, you may change the definition of make_pair.

> Question: do you know whether a newer verison of CC exists, and what
> bugs it fixes. And, more importantly, would you have access to it?

Currently, I work with Sun CC 5.0 with all patches available (the last
dated Dec. 14th 1999!). It seems to me like Sun has supported CC very
well since it has been released in 1998. They also changed almost every
header file since then (please don't ask me about any details). 

These days, Sun is offering a beta program for Sun CC 6.0. I looked into
the release notes in order to see which bugs have been fixed. However,
just a few minor things were corrected (officially). These are totally
irrelevant for our discussion. Interestingly, Sun points out that even
in version 6.0 their compiler will print a number of warnings w.r.t. the
standard header files. Obviously, they do not dare to change them. At
the moment, I do not intend to test CC 6.0 because then I will be
confronted with even more beta testing (I think my boss would prefer if
I finish my Ph.D. thesis; of course written with LyX :-)

Michael


Reply via email to