Xref: utzoo comp.unix.aix:4596 comp.unix.misc:1312 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uakari.primate.wisc.edu!caen!uwm.edu!psuvax1!hsdndev!husc6!wjh12!jnl From: jnl@wjh12.harvard.edu (Joshua Lobel) Newsgroups: comp.unix.aix,comp.unix.misc Subject: problems with variables in C on RS-6000 -- behaving like static Message-ID: <593@wjh12.harvard.edu> Date: 17 Apr 91 21:57:31 GMT Reply-To: jnl@wjh12.UUCP (Joshua Lobel) Distribution: na Organization: Harvard University, Cambridge MA Lines: 31 I'm having a problem with the C compiler on a IBM RS-6000 running AIX 3003. When I run this program on the IBM RISC 6000 the variables in p1 act as if they have static storage. Why is this happening? #include p1() { char a[5],b[5]; puts(a); puts(b); gets(a); strcpy(b,a); } main() { p1(); p1(); } This is the output: Script started on Wed Apr 17 17:08:36 1991 /u/ts/drs>a.out pass1 pass1 pass1 pass2 script done on Wed Apr 17 17:08:55 1991