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: Martin Sebor <msebor at gmail dot com>
- To: Pialy Ghosh <pink dot pia at gmail dot com>, Mason <slash dot tmp at free dot fr>
- Cc: GCC help <gcc-help at gcc dot gnu dot org>
- Date: Thu, 24 Aug 2017 19:27:12 -0600
- 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>
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