What's the difference between (*(x)).a and (x)->a
Wed Jan 21 03:07:00 GMT 2009
I see. Thanks, guys.
On Wed, Jan 21, 2009 at 8:03 AM, Lawrence Crowl <firstname.lastname@example.org> wrote:
> On 1/20/09, Andrew Haley <email@example.com> wrote:
>> This shouldn't have been posted to firstname.lastname@example.org, which is for gcc
>> development only. Redirecting.
>> holderlin wrote:
>> > Is there any difference between (*(x)).a and (x)->a, if x is an
>> > expression which generates a struct pointer.
>> No. The standard says that in all cases they are the same.
> Just to be sure that there is no miscommunication, Andrew is assuming
> that by gcc you mean gcc when compiling C.
> They are the same for the C language, but may be different in C++
> if the struct has overloaded the * or -> operators.
> Lawrence Crowl
Department of Applied Math., Nankai University
More information about the Gcc-help