[parted-devel] About the obsolete use of struct initialization

Wang Dong dongdwdw at linux.vnet.ibm.com
Tue Jun 14 01:14:29 UTC 2016



On 06/08/2016 02:22 AM, Curtis Gedak wrote:
> On 2016-06-07 12:09 PM, Brian C. Lane wrote:
>> On Tue, Jun 07, 2016 at 11:04:13AM +0800, Wang Dong wrote:
>>> Hi,
>>>
>>> I am going to write some code under libparted.
>>> But I found struct initialization which is an obsolete use.
>>>
>>> *for example*:
>>>           boo = {next: 1 , current: 2}
>>>
>>> Actually, I found this use in other places.
>>>
>>> I checked it out and it turns out this use is obsolete in gcc 2.5
>>> And I found my gcc is 5.x. So I think this use may be so old.
>>> Can I use the new? But I am not sure if the keeping use of this
>>> is for compatibility.
>>>
>>> *So I just ask should I use comply with**
>>> **the style of old or can I use the new initialization style?*
>> parted is a fairly old project :) I haven't seen any build errors
>> related to using the old style initialization so I'd stick with it.
>> parted is also used in a number of different environments, so I wouldn't
>> want to introduce changes that may break some of those.
>>
> Hi Wang,
>
> With parted being an old project there are several different sites with
> copies of the source code that may be out-of-date.
>
> To my knowledge the currently used repository is on savannah.gnu.org and
> can be viewed at the following link:
>
> http://git.savannah.gnu.org/cgit/parted.git
>
> Regards,
> Curtis
>
OK, I think I got it.
Thanks.
-- 
Best regards. Wang Dong




More information about the parted-devel mailing list