This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Can something similar to &x=&y be accomplished in C
- From: "Diego Novillo" <dnovillo at google dot com>
- To: "Jim Stapleton" <stapleton dot 41 at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Wed, 29 Aug 2007 08:01:03 -0400
- Subject: Re: Can something similar to &x=&y be accomplished in C
- References: <80f4f2b20708290421ua09789coc3d42c4b91eaca20@mail.gmail.com>
On 8/29/07, Jim Stapleton <stapleton.41@gmail.com> wrote:
> 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?
Not possible without pointers. In fact, the C++ version using &t
expands to almost the same code you'd have with pointers in C. Try
using -fdump-tree-optimized on the C++ version.