This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/53382] incorrect associativity in expressions


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53382

--- Comment #4 from Miguel Barao <miguel.barao at gmail dot com> 2012-05-17 09:42:48 UTC ---
There was a misunderstanding between associativity and operator evaluation
order in the original bugreport.
I now understand that the language does not specify the evaluation order of an
operator, and is bad a practice to depend such behavior.
Still, I would like to add that expressions like
- f( ) + f( )
and
- ( f( ) - f( ) ) 
produce different evaluation orders, and therefor different results, when f( )
has side effects.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]