3 msgInline assembly and local variable storage
2 msgHelp with -march and -mcpu issues
3 msgGCC - Preserving statement expression results o...
10 msgSolution sought to GCC 4.1.1 backtrace problem

Can something similar to &x=&y be accom...
\ Jim Stapleton (29 Aug 2007)
. \ Diego Novillo (29 Aug 2007)
. \ Tom St Denis (29 Aug 2007)
. . \ Jim Stapleton (29 Aug 2007)
. . . \ Tom St Denis (30 Aug 2007)

1 msgGNAT/GCC 4.2 build problem on FreeBSD-CURRENT
3 msgLocal disable of specific warnings for a sectio...
3 msgcan gcc compile from memory buffer?
2 msgMac OS X cross compile for i386-elf
2 msgUnsubscription
13 msgSUSv3's 'memory location' and threads
2 msghow to code global indirect branches ?
2 msgHelp about calculation of 'S' notation for a re...
1 msgmovaps missaligment in threads
3 msgcall stack's order of parameters
2 msg-fno-stack-protector not ensuring binary compat...
8 msgGCC asm block optimizations on x86_64
2 msg.p2align
3 msgcompile errors from gcc
5 msgBuilding gmp and mpfr within gcc
Subject:Can something similar to &x=&y be accomplished in C
Group:Gcc-help
From:Jim Stapleton
Date:29 Aug 2007


Lets say I'm iterating through an array, and I have a lot of
operations on the array needed to alter it...

int p = {1, 2,3,4 ...};
for(int i = 0; i < length_of_p; i++)
{
some_op(p+i);
}

void some_op(int *t)
{
/*do stuff with/to t*/
}

In C++ I could simply do int &t in the function, and it'd be fine, but
in C I have to use a pointer, which means a lot of dereferencing. Is
there any way to efficiently have the same effect as &x = &y (having a
variable "be" another variable, rather than just point to it) in plain
C with GCC, or is that out of the question?

Thanks,
-Jim Stapleton


© 2004-2008 readlist.com