Problem building vector/reim_source.c

Brian Gough bjg@network-theory.co.uk
Wed Dec 19 13:20:00 GMT 2001


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:

----------------------------------------------------------------------
$ cat test.c
#include <stdio.h>

typedef struct {
  int k;
  const int kmax;
} A;

A create_A (void)
{
  A a = { 1, 2 };
  return a ;
}

int main (void)
{
  A a = create_A ();
  printf("a.k=%d\n", a.k);
  printf("a.kmax=%d\n", a.kmax);
  return 0;
}

$ gcc -ansi -pedantic -Wall -O2 test.c    # gcc-2.7.2.3 and gcc-3.0
$ ./a.out
a.k=1
a.kmax=2

$ cc -V test.c
cc: Sun WorkShop 6 update 1 C 5.2 2000/09/11
acomp: Sun WorkShop 6 update 1 C 5.2 2000/09/11
"test.c", line 11: left operand must be modifiable lvalue: op "="
"test.c", line 16: left operand must be modifiable lvalue: op "="
cc: acomp failed for test.c

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



More information about the Gsl-discuss mailing list