Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uakari.primate.wisc.edu!uflorida!travis!tom From: tom@ssd.csd.harris.com (Tom Horsley) Newsgroups: comp.lang.perl Subject: uninitialized variable in a2p Message-ID: Date: 17 Aug 90 12:27:48 GMT Sender: news@travis.csd.harris.com Organization: Harris Computer Systems Division Lines: 39 This is not a particularly critical problem, but I couldn't resist the opportunity to show off our optimizing compiler :-). Building a2p with the optimizer turned on gives the following message: cc -c -O3 -g a2p.c "a2py.c", line 1210: warning: Uninitialized item detected Looking in a2py.c shows the error in function fixfargs. The call to fatal uses an uninitialized variable in the error message, perhaps it should be prevargs? fixfargs(name,arg,prevargs) int name; int arg; int prevargs; { ... if (type == OCOMMA) { numargs = fixfargs(name,ops[arg+1].ival,prevargs); ... } else if (type == OVAR) { ... numargs = prevargs + 1; } else fatal("panic: unknown argument type %d, arg %d, line %d\n", type,numargs+1,line); ^^^^^^^ return numargs; } -- ====================================================================== domain: tahorsley@csd.harris.com USMail: Tom Horsley uucp: ...!uunet!hcx1!tahorsley 511 Kingbird Circle Delray Beach, FL 33444 +==== Censorship is the only form of Obscenity ======================+ | (Webster's definition of obscene: Offensive to decency.) | +====================================================================+