This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] gcc/dwarf2asm.c: Add static_output_delta() with var_list for dw2_asm_output_delta()



On 06/16/2014 10:37 PM, Joseph S. Myers wrote:
> On Mon, 16 Jun 2014, Chen Gang wrote:
> 
>> +static_output_delta (int size, const char *lab1, const char *lab2,
> 
> static_ is not a helpful naming convention, since the fact that a function 
> is static is nothing to do with what that function does.  Try something 
> like dw2_asm_voutput_delta to indicate a va_list version of 
> dw2_asm_output_delta.
> 

Hmm... OK, I will send patch v2 for it. In future, it may need be as
extern function like vprintf() for printf(), which need not change its
name, again.

But at present, it remains as static until really find a caller has to
call it outside (let extern functions as few as possible, unless related
code really can be shared).

For me (may it only be personal hobby): adding 'static_' prefix can make
it easy to name internal functions, and also let readers (especially
'grep' from shell) know about it is static, easily.


Thanks.
-- 
Chen Gang

Open, share, and attitude like air, water, and life which God blessed


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]