Article View: comp.sys.ibm.pc.programmer
Article #602Re: No Aliasing Compile Option
From: Joseph D. Shapiro
Date: Mon, 04 Jun 1990 21:22
Date: Mon, 04 Jun 1990 21:22
40 lines
1503 bytes
1503 bytes
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
Technical Details
Message-ID:
<12215@bunker.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!sdd.hp.com!think!yale!bunker!shapReferences:
<1990May23.234917.21858@uunet!unhd> <250@demott.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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