Re: replace do-while macros with static inline functions

2013-12-13 Thread Prathamesh Kulkarni
On Sat, Dec 14, 2013 at 1:17 AM, Diego Novillo wrote: > > > > On Wed, Dec 11, 2013 at 10:03 AM, Prathamesh Kulkarni > wrote: >> >> I was wondering if it was a good idea to replace do-while macros with >> static inline functions returning void, where appropriate ?

Re: replace do-while macros with static inline functions

2013-12-13 Thread Ondřej Bílka
On Fri, Dec 13, 2013 at 02:42:23PM -0500, Trevor Saunders wrote: > On Wed, Dec 11, 2013 at 08:33:03PM +0530, Prathamesh Kulkarni wrote: > > I was wondering if it was a good idea to replace do-while macros with > > static inline functions returning void, where appropriate

Re: replace do-while macros with static inline functions

2013-12-13 Thread Diego Novillo
Bah. Forgot to remove html. On Fri, Dec 13, 2013 at 2:47 PM, Diego Novillo wrote: > > > > On Wed, Dec 11, 2013 at 10:03 AM, Prathamesh Kulkarni > wrote: >> >> I was wondering if it was a good idea to replace do-while macros with >> static inline functions

Re: replace do-while macros with static inline functions

2013-12-13 Thread Trevor Saunders
On Wed, Dec 11, 2013 at 08:33:03PM +0530, Prathamesh Kulkarni wrote: > I was wondering if it was a good idea to replace do-while macros with > static inline functions returning void, where appropriate ? > By "where appropriate" I mean: > a) call to macro contains no side-e

replace do-while macros with static inline functions

2013-12-11 Thread Prathamesh Kulkarni
I was wondering if it was a good idea to replace do-while macros with static inline functions returning void, where appropriate ? By "where appropriate" I mean: a) call to macro contains no side-effects b) macro does not modify the arguments. c) macro does not use any preprocessor opera