This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: Problem building vector/reim_source.c
On Thu, Aug 23, 2001 at 02:42:35PM +0100, Brian Gough wrote:
> gsl-discuss@lists.thewrittenword.com writes:
> > On Mon, Aug 20, 2001 at 12:25:41PM +0100, Brian Gough wrote:
> > > gsl-discuss@lists.thewrittenword.com writes:
> > > > I've opened a problem report with Sun and gave them a small test case
> > > > to reproduce the bug. I'll forward your info below if they need
> > > > convincing.
> > >
> > > Sounds good. You probably saw it on comp.std.c but just for reference
> > > this was the simplest test case I could find:
> >
> > According to the Sun engineer:
> > I don't think that's valid C code.
> >
> > I don't think you can initialize a variable in C with the value of a
> > function call like that.
> >
> > This is using your C code below. Can you point me at the section in
> > C89 that says the code below should work?
>
> I've been looking at it some more and it may be a moot point now.
>
> The Sun C compiler accepts the code in gsl_vector if the const is
> moved outside the struct, e.g. typedef const struct... instead of
> typedef struct { const ... }, which is suitable for this case.
>
> I've checked this into CVS if you want to try it.
It works with Forte 6.1 and 6.2 (C 5.1 and 5.2). I also tested with
IRIX C, HP-UX C, Tru64 UNIX C, and AIX C. Everything works fine except
AIX which reports:
gmake[2]: Entering directory `/opt/build/gsl-0.9.1/vector'
/bin/sh ../libtool --mode=compile xlc -DHAVE_CONFIG_H -I. -I. -I..
-I.. -I.. -O2 -qmaxmem=-1 -qarch=com -c init.c
mkdir .libs
xlc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I.. -O2 -qmaxmem=-1 -qarch=com
-c init.c -DPIC
"../gsl/gsl_vector_long_double.h", line 88.1: 1506-120 (S) Function
cannot return a const qualified type.
"../gsl/gsl_vector_long_double.h", line 91.1: 1506-120 (S) Function
cannot return a const qualified type.
"../gsl/gsl_vector_long_double.h", line 107.1: 1506-120 (S) Function
cannot return a const qualified type.
"../gsl/gsl_vector_long_double.h", line 112.1: 1506-120 (S) Function
cannot return a const qualified type.
--
albert chin (china@thewrittenword.com)