Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!sdd.hp.com!think!yale!bunker!shap From: shap@bunker.UUCP (Joseph D. Shapiro) Newsgroups: comp.sys.ibm.pc.programmer Subject: Re: No Aliasing Compile Option Keywords: Microsoft 6.0 C update woes Message-ID: <12215@bunker.UUCP> Date: 4 Jun 90 21:22:12 GMT References: <1990May23.234917.21858@uunet!unhd> <250@demott.COM> Reply-To: shap@clunker.UUCP (Joseph D. Shapiro) Organization: ISC-Bunker Ramo, an Olivetti Company, Shelton, Ct Lines: 40 In article <250@demott.COM> kdq@demott.COM (Kevin D. Quitt) writes: > Unless I'm greatly mistaken, the only problem for optimization with >aliasing involves the use of a variable and its alias *within the same >function*. Calling a function with a pointer doesn't hurt, since the >compiler can know that variables may not be preserved across the >function call. I've used the aliasing release on programs that follow >this model with nary a problem. how about the following.... In file a.c static int foo; main() { bar(foo); } baz() { foo++; } in file b.c foo(int x) { ... establish a value for x here ... baz(); ... reference x here ... } is this not aliasing as well? will not -Oa cause trouble in b.c? -- __--__--__--__--__--__--__--__--__--__--__--__--__--__--__--__--__--__--__--__ Joe Shapiro "My other car is a turbo... ISC-Bunker Ramo ...too." {decvax,yale,philabs,oliveb}!bunker!shap