Re: [PATCH] Do not make trace.c/getnanotime an inlined function

2014-09-30 Thread Junio C Hamano
Duy Nguyen writes: > Hmm.. no. Even if the function is inlined in multiple places, inline > code still points to the same "offset" variable. OK, thanks. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [PATCH] Do not make trace.c/getnanotime an inlined function

2014-09-30 Thread Duy Nguyen
On Tue, Sep 30, 2014 at 12:48 AM, Junio C Hamano wrote: > Duy Nguyen writes: > >> On Sun, Sep 28, 2014 at 2:50 PM, Ben Walton wrote: >>> Oracle Studio compilers don't allow for static variables in functions >>> that are defined to be inline. GNU C does permit this. Let's reference >>> the C99 st

Re: [PATCH] Do not make trace.c/getnanotime an inlined function

2014-09-29 Thread Johannes Sixt
Am 28.09.2014 um 22:42 schrieb Ben Walton: > On Sun, Sep 28, 2014 at 8:15 PM, Johannes Sixt > wrote: > Am 28.09.2014 um 09:50 schrieb Ben Walton: > > -inline uint64_t getnanotime(void) > > +uint64_t getnanotime(void) > > But then the function could stay stati

Re: [PATCH] Do not make trace.c/getnanotime an inlined function

2014-09-29 Thread Junio C Hamano
Duy Nguyen writes: > On Sun, Sep 28, 2014 at 2:50 PM, Ben Walton wrote: >> Oracle Studio compilers don't allow for static variables in functions >> that are defined to be inline. GNU C does permit this. Let's reference >> the C99 standard though, which doesn't allow for inline functions to >> co

Re: [PATCH] Do not make trace.c/getnanotime an inlined function

2014-09-29 Thread Duy Nguyen
On Sun, Sep 28, 2014 at 2:50 PM, Ben Walton wrote: > Oracle Studio compilers don't allow for static variables in functions > that are defined to be inline. GNU C does permit this. Let's reference > the C99 standard though, which doesn't allow for inline functions to > contain modifiable static var

Re: [PATCH] Do not make trace.c/getnanotime an inlined function

2014-09-28 Thread Johannes Sixt
Am 28.09.2014 um 09:50 schrieb Ben Walton: > Oracle Studio compilers don't allow for static variables in functions > that are defined to be inline. GNU C does permit this. Let's reference > the C99 standard though, which doesn't allow for inline functions to > contain modifiable static variables. >

[PATCH] Do not make trace.c/getnanotime an inlined function

2014-09-28 Thread Ben Walton
Oracle Studio compilers don't allow for static variables in functions that are defined to be inline. GNU C does permit this. Let's reference the C99 standard though, which doesn't allow for inline functions to contain modifiable static variables. Signed-off-by: Ben Walton --- trace.c | 2 +- 1 f