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
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.