Re: [Libhugetlbfs-devel] [PATCH] Rename variable in inline function

2010-11-18 Thread Eric B Munson
On Thu, 18 Nov 2010, Tom Rokicki wrote: > Odd, I've never seen gcc emit such a warning. What version of gcc are > you using? In any case, silencing a warning certainly justifies the change. > > -tom I am using gcc (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5 The actual warning showed up with the wor

Re: [Libhugetlbfs-devel] [PATCH] Rename variable in inline function

2010-11-18 Thread Tom Rokicki
Odd, I've never seen gcc emit such a warning. What version of gcc are you using? In any case, silencing a warning certainly justifies the change. -tom On Thu, Nov 18, 2010 at 6:59 AM, Eric B Munson wrote: > On Thu, 18 Nov 2010, David Gibson wrote: > >> On Wed, Nov 17, 2010 at 02:54:39PM -0700,

Re: [Libhugetlbfs-devel] [PATCH] Rename variable in inline function

2010-11-18 Thread Eric B Munson
On Thu, 18 Nov 2010, David Gibson wrote: > On Wed, Nov 17, 2010 at 02:54:39PM -0700, Eric B Munson wrote: > > On Wed, 17 Nov 2010, Tom Rokicki wrote: > > > > > Why is it dangerous to use it in an inlined function? Inline functions > > > preserve lexical scoping. > > > > > > > I had it collide

Re: [Libhugetlbfs-devel] [PATCH] Rename variable in inline function

2010-11-17 Thread David Gibson
On Wed, Nov 17, 2010 at 02:54:39PM -0700, Eric B Munson wrote: > On Wed, 17 Nov 2010, Tom Rokicki wrote: > > > Why is it dangerous to use it in an inlined function? Inline functions > > preserve lexical scoping. > > > > I had it collide with a global variable in the test suite and I > figured t

Re: [Libhugetlbfs-devel] [PATCH] Rename variable in inline function

2010-11-17 Thread Tom Rokicki
I'm not sure what you mean by "collide". It will (due to lexical scoping) *hide* the global variable. But that's what we want in this case. Anyway, no worries; the change only affects readability, not semantics, so I'm not saying it should be reversed. -tom On Wed, Nov 17, 2010 at 1:54 PM, Eri

Re: [Libhugetlbfs-devel] [PATCH] Rename variable in inline function

2010-11-17 Thread Eric B Munson
On Wed, 17 Nov 2010, Tom Rokicki wrote: > Why is it dangerous to use it in an inlined function? Inline functions > preserve lexical scoping. > I had it collide with a global variable in the test suite and I figured that it wouldn't the last time. Eric signature.asc Description: Digital sign

Re: [Libhugetlbfs-devel] [PATCH] Rename variable in inline function

2010-11-17 Thread Tom Rokicki
Why is it dangerous to use it in an inlined function? Inline functions preserve lexical scoping. On Wed, Nov 17, 2010 at 12:46 PM, Eric B Munson wrote: > hpage_size is a fairly common variable name in this library so it > is dangerous to use it in an inlined function.  This patch renames it > to

Re: [Libhugetlbfs-devel] [PATCH] Rename variable in inline function

2010-11-17 Thread Eric B Munson
On Wed, 17 Nov 2010, Eric B Munson wrote: > hpage_size is a fairly common variable name in this library so it > is dangerous to use it in an inlined function. This patch renames it > to __hpage_size to avoid name collisions. > > Signed-off-by: Eric B Munson Applied, thanks. Eric signature.as

[Libhugetlbfs-devel] [PATCH] Rename variable in inline function

2010-11-17 Thread Eric B Munson
hpage_size is a fairly common variable name in this library so it is dangerous to use it in an inlined function. This patch renames it to __hpage_size to avoid name collisions. Signed-off-by: Eric B Munson --- tests/hugetests.h |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) di