This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH] ld/ldlang.h: use 'etree_base' instead of 'base' to avoid cross-compiling warning
- From: Chen Gang <gang dot chen dot 5i5j at gmail dot com>
- To: nickc at redhat dot com, macro at linux-mips dot org, clm at redhat dot com, binutils at sourceware dot org
- Date: Sun, 25 May 2014 06:59:44 +0800
- Subject: Re: [PATCH] ld/ldlang.h: use 'etree_base' instead of 'base' to avoid cross-compiling warning
- Authentication-results: sourceware.org; auth=none
- References: <538083D9 dot 9050507 at gmail dot com> <20140524153043 dot GF5162 at bubble dot grove dot modra dot org>
Firstly, thank you for replying quickly, and it is my first time to send
patch to binutils, and I shall continue.
On 05/24/2014 11:30 PM, Alan Modra wrote:
> On Sat, May 24, 2014 at 07:34:49PM +0800, Chen Gang wrote:
>> It is not recommend to use a simple name to express a global variable,
>> for it is easy to get '-Wshadow'. So use 'etree_base' instead of.
> Better, move base into mri.c.
> * ldlang.c (base): Move variable to..
> * mri.c: ..here, and make static.
> * ldlang.h (base): Delete declaration.
It sounds reasonable to me, but still recommend to use 'etree_base'
instead of 'base' (it is still a global variable within "ld/mri.c").
BTW, the subject of the original message (sent by me) is not precise,
need use "ld: mri:" instead of "ld/ldlang.h:".
If still necessary to let me send patch v2 for it, please let me know.
Open, share and attitude like air, water and life which God blessed