[Top][All Lists]

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

RE: [aspell-devel] Ported to Solaris / Sun WorkShop 6 compiler

From: Kevin Atkinson
Subject: RE: [aspell-devel] Ported to Solaris / Sun WorkShop 6 compiler
Date: Mon, 19 Jan 2004 05:33:37 -0500 (EST)

On Mon, 19 Jan 2004, Flemming Frandsen wrote:

> Kevin Atkinson wrote:
> > Try it and see.  if it works put an ifdef around the operator=. 
> > Without the operator= there might be an unnecessary temporary but
> > there will be no functional difference.
> I ended up ifdef'ing the copyconstructor in stead, in any case the explicit 
> calls to the String constructor are gone and the patch is smaller:)
> > There should be an implicit conversion from StackPtr<Choices> to
> > Choices *.  It is probably the const which is causing the problem. 
> > Don't change the phototype of the function.  Instead access the
> > pointer in StackPtr with the get method.
> This seems wrong, all the places that use display_menu use it with a
> StackPtr<Choices> parameter converting to Choices * and then back to
> StackPtr<Choices> inside the function is silly IMHO.

StackPtr is a simple smart pointer which will delete the object when it 
goes out of scope.  It is not meant to be passed as a parameter.  And it 
DOES NOT get converted back to a StackPtr inside the function.  Where did 
you get that idea.  Try removing the const part of the pointer in the 
paramaters.  If that does not work (it should) than use the get method as 
I said.

> > The interface everyone else is suppose to use is the C one.
> > But all external C++ symbols should also be available in the library.
> They might not be though, it all depends on what the C compiler does to
> the C++ symbols.

There should not be a C compiler involved you are linking one C++ library 
with another, both of which will compiled with the same compiler.

> > The "aspell" application used the internal one all over the place.
> > Something is not linking correctly if it can't find those symbols.
> Correct, I've ifdefed the code for the sun compiler, I hope that's ok,
> because I can't figure out how to get it to link so it works.

Thats fine but please remove your "There is no good reason" comment and 
reverse the if (ie use ifndef).  if you don't do I will so its not a 
major deal.

> > If you can send me a complete patch I find acceptable which will allow
> > Aspell to compile with Sun CC I will accept it.
> I hope this is ok, the only issue you had with it that I didn't change
> is the display_menu one.

There is one more thing I noticed.  What is going on with string_buffer?

> I do a hack in the build script that makes the makefile use CC (c++
> compiler) in stead of cc (the C compiler) for linking the example
> programs as it seems I can't get the linker to link the stl lib to
> as long as people use CC to link the programs everything is
> fine, though.

Ok I will include that.  Can I direct people too you if they have 


reply via email to

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