This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Regarding GCC 4.9.2 backward compatibility with 3.2.1
- From: Pialy Ghosh <pink dot pia at gmail dot com>
- To: Martin Sebor <msebor at gmail dot com>
- Cc: Mason <slash dot tmp at free dot fr>, GCC help <gcc-help at gcc dot gnu dot org>
- Date: Mon, 28 Aug 2017 15:52:11 +0800
- Subject: Re: Regarding GCC 4.9.2 backward compatibility with 3.2.1
- Authentication-results: sourceware.org; auth=none
- References: <CANL=Od6eo9nyV5y_7w8xNyPgzrJYdoZ5Yup-VQrF9=OFAdnAeg@mail.gmail.com> <b7cd0256-4122-f0bb-3d0f-1dd75d26f78a@free.fr> <CANL=Od6LHzOZe4wzVXm+y_BUsEbWKOfeWrMBKb71Ne_hxV_MLA@mail.gmail.com> <9160704d-d875-5db6-6242-bccd804903d7@gmail.com>
Thanks for your response.
Regards,
Pialy
On Fri, Aug 25, 2017 at 9:27 AM, Martin Sebor <msebor@gmail.com> wrote:
> On 08/24/2017 03:46 AM, Pialy Ghosh wrote:
>>
>> Hi All,
>>
>> Thanks for your response.
>> The code snippet is like below
>> (void *)ShMem = shmat(ShId, 0, 0);
>>
>> Error in this line: lvalue required as left operand of assignment.
>>
>>
>> From GCC 3.4 lvalue casting is removed.
>> Is there any way to solve this error without changing the code? If we
>> can use compiler 4.9.2 without any code modification.
>> Enabling this support by adding any flag, if any?
>
>
> I don't think there is a way. At my last job years ago we migrated
> a large code base from an ancient GCC (I think 3.4.5) to a more recent
> version and this was among the errors that led to many changes. But
> in the long run, investing in modernizing a code base pays off.
>
> Martin
>