buglwIP - A Lightweight TCP/IP stack - Bugs: bug #2140, RFC: replacing macros with inline...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #2140: RFC: replacing macros with inline fns

Submitted by:  Jani Monoses <jani>
Submitted on:  Mon 06 Jan 2003 12:37:02 PM UTC  
 
Category: NoneSeverity: 1 - Wish
Item Group: Change RequestStatus: None
Privacy: PublicAssigned to: None
Open/Closed: ClosedPlanned Release: None
lwIP version: None

Thu 09 Feb 2006 12:20:11 PM UTC, comment #4:

Just be carefull with macro's. I see no reason to replace/change the current macro's unless they're wrong or contain bugs. I agree inlining has the advantage in the type checks on arguments and the default introduction of a scope{}. The disadvantage was previously mentioned. I'm closing this.

Christiaan Simons <christiaans>
Project Member
Thu 29 Dec 2005 10:16:30 PM UTC, comment #3:

I'd like to see inline functions, it would make debugging much easier, the macros are also horrid to read, it would get rid of a compiler warning, "warning: controlling expression is constant", in tcp_input() on this line: TCP_EVENT_RECV(pcb, NULL, ERR_OK, err);

Gary

Gary James <gjames>
Mon 06 Jan 2003 03:20:07 PM UTC, comment #2:

Not all compilers used on lwip are good :(
But I meant replacing macros such as TCP_REG with inline functions.Maybe this reduces some warnings especially for buggy compilers and it's generally accepted AFAIK as a better
method than macros.

Jani Monoses <jani>
Project Member
Mon 06 Jan 2003 03:05:13 PM UTC, comment #1:

I don't see any big drawback as most compilers have this feature.

But... A good compiler with optimization set right will inline small functions anyway.

Remember, inlining is only supported in a single file (or maybe compile?).

David Haas <davidhaas>
Project Member
Mon 06 Jan 2003 12:37:02 PM UTC, original submission:

Curious if anybody sees drawbacks of using proper inline functions where possible.I assume not all compilers support it.If you use such a compiler speak up so we drop this fine idea :(

Jani Monoses <jani>
Project Member

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 3 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Thu 09 Feb 2006 12:20:11 PM UTCchristiaansOpen/ClosedOpen=>Closed
Thu 30 Jan 2003 03:52:41 PM UTClikewiseItem GroupFeature Request=>(Error - Not Found)
Thu 30 Jan 2003 03:52:13 PM UTClikewiseItem GroupNone=>(Error - Not Found)

Back to the top


Powered by Savane 3.1-cleanup1