Displaying 2 results from an estimated 2 matches for "ffc66f95".
2007 Aug 16
2
[LLVMdev] c const
On Thu, 16 Aug 2007, Holger Schurig wrote:
>> if the programmer is going to tell you that the memory pointed
>> to by a pointer argument is never written.
>
> There are ways to cast away a const.
You don't even need casts:
void foo(const int *P, int *Q) {
x = *P;
*Q = 1;
y = *P // redundant?
}
void bar() {
int X = 0;
foo(&X, &X);
}
-Chris
--
2007 Aug 17
0
[LLVMdev] c const
...u should get the
benefit of this as the alias analysis will assume that the pointed to
object is neither aliased nor written.
--
Christopher Lamb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20070817/ffc66f95/attachment.html>