[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: zmailer 2.99.48p2



> 
> Yes!  There are compilers that will not compile code that writes into
> const locations.
> 
> This is what Sun's compiler (sunpro version 4.0) has to say:
...  How about doing following (either of the two ways):


const char *foocon;
void xxxtest () {
  char *foowrite;		/* 1 */
  foowrite = (char *)foocon;	/* 1 */
  *foowrite = 1;		/* 1 */
  *(char *)foocon = 1;		/* 2 */
}

	If either works, we can survive without massive rewrite.
	GCC warns about both of these cases.

	My test a moment ago at the university sparc gave a license
	error with Sun acomp ...  Weird.

> cc    -o foo foo.c 
> "foo.c", line 2: left operand must be modifiable lvalue: op "="
> cc: acomp failed for foo.c
> *** Error code 2
>
> gcc 2.7  issues a warning.

	/Matti Aarnio