Re: Empty inline functions vs. empty CPP macros

2014-03-12 Thread Sebastian Huber
I updated the wiki page: http://www.rtems.org/wiki/index.php/Coding_Conventions#Compile-Time_Features -- Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.hu...@embedded-brains

Re: Empty inline functions vs. empty CPP macros

2014-03-11 Thread Gedare Bloom
On Tue, Mar 11, 2014 at 9:01 AM, Gedare Bloom wrote: > On Tue, Mar 11, 2014 at 4:47 AM, Sebastian Huber > wrote: >> Hello, >> >> I would like to add a new section to the RTEMS coding style. How do we want >> to deal with features available only in case certain pre-processor symbols >> are define

Re: Empty inline functions vs. empty CPP macros

2014-03-11 Thread Sebastian Huber
On 2014-03-11 15:11, Joel Sherrill wrote: Empty static inlines normally optimize away. So no worries there. I always prefer static inlines over macros. Do you have specific example? There are places this may work but others that it cannot. Gedare suggested to use macros instead of empty inlin

Re: Empty inline functions vs. empty CPP macros

2014-03-11 Thread Joel Sherrill
Empty static inlines normally optimize away. So no worries there. I always prefer static inlines over macros. Do you have specific example? There are places this may work but others that it cannot. --joel On 3/11/2014 8:01 AM, Gedare Bloom wrote: > On Tue, Mar 11, 2014 at 4:47 AM, Sebastian Hub

Re: Empty inline functions vs. empty CPP macros

2014-03-11 Thread Gedare Bloom
On Tue, Mar 11, 2014 at 4:47 AM, Sebastian Huber wrote: > Hello, > > I would like to add a new section to the RTEMS coding style. How do we want > to deal with features available only in case certain pre-processor symbols > are defined? For example > > #define FEATURE_X > > 1: > > static inline

Empty inline functions vs. empty CPP macros

2014-03-11 Thread Sebastian Huber
Hello, I would like to add a new section to the RTEMS coding style. How do we want to deal with features available only in case certain pre-processor symbols are defined? For example #define FEATURE_X 1: static inline feature_x_func(int a, double b, void *c) { #ifdef FEATURE_X /* Do som