[comp.unix.aix] looking for rs/6k aix 3.1 buglist

dmj@cunixa.cc.columbia.edu (Douglas M Jaffe) (05/25/91)

i'm trying to evaluate an rs/6000 530 running aix 3.1.5
(at least that's what our ibm rep has been saying).  i would 
appreciate any comments on its pros/cons, especially on 
how well suited it is for use as a compute server. 

also, the ibm reps are under the impression that the machine
is near-perfect.  either (1) they're high on drugs, or (2) their
standards are low (probably _both_).  

if anyone knows of definite bugs concerning 3.1.5, please email
me at the above address (dmj@cunixa.cc.columbia.edu).  i'll 
compile the list and post it to this newsgroup.

so far, i know of one bug relating to the development system:

BUG: cc or xlc has problems casting a modifiable
lvalue to an lvalue of a different type.  i checked
the official ansi reference (ie. not k&r 2ed), and 
it specifically allows cast expressions that result
in modifiable lvalues.

below is a session log:
======================================================================
$ 
$ cat cast.c
#include <stdio.h>

main()
{
    char *c;
    int  buf[100];

    ((int *)c) = &(buf[0]); 

    exit(0);
}
$
$ make cast
    cc -O  cast.c -o cast
        8 |         ((int *)c) = &(buf[0]); 
            .........a......................
a - 1506-025: (S) Operand must be a modifiable lvalue.
1254-004  The error code from the last failed command is 1.

Make Quitting.
$
======================================================================
Please note:
   1. i'm using the expression "((int *)c) = &(buf[0])"
      to specifically show that there are no ambiguities
      in the expression.
   2. "c = (char *) buf" is better for _this_ toy case, but 
      for _my_ purposes (too complicated to mention here), i
      need to be able to write macros that can cast modifiable
      lvalues.  for those interested, email me.



as a final word, please email me any bugs that you have encountered
using aix 3.1, (esp. 3.1.5).  i will compile and verify the list, send
copies to those who emailed to me, and post it to this newsgroup.

thanks in advance.

----------------------------------------------------------------------
             _
  ,---------'_)
 (_/\  O O  /
     \  v  /  
      \___/
        U

  "doggie fresh"
----------------------------------------------------------------------
             _
  ,---------'_)
 (_/\  O O  /

jfh@rpp386.cactus.org (John F Haugh II) (05/26/91)

In article <1991May25.005319.29296@cunixf.cc.columbia.edu> dmj@cunixa.cc.columbia.edu (Douglas M Jaffe) writes:
>    cc -O  cast.c -o cast
>        8 |         ((int *)c) = &(buf[0]); 
>            .........a......................
>a - 1506-025: (S) Operand must be a modifiable lvalue.
>1254-004  The error code from the last failed command is 1.

The expression
	
	((int *) c)

is not a modifiable l-value.  It is the value of the variable "c"
treated as a pointer to an integer.  If you want to modified what
"c" points to, insert a "*" before it.  That is,

	*((int *) c) = &(buf[0]);

The result of a cast is not an l-value.

If you want "c" to contain the value of the address of the 0-th
element, you must do something completely different, like the

	c = (char *) buf;

example that you gave, or possibly

	*((int *) &c) = &buf[0];

which will do something similiar (only different ;-)
-- 
John F. Haugh II        | Distribution to  | UUCP: ...!cs.utexas.edu!rpp386!jfh
Ma Bell: (512) 255-8251 | GEnie PROHIBITED :-) |  Domain: jfh@rpp386.cactus.org
"If liberals interpreted the 2nd Amendment the same way they interpret the
 rest of the Constitution, gun ownership would be mandatory."