[PATCH 3/6] [AArch64-4.7] Fix warning - aarch64_legitimize_reload_address passes the wrong type to push_reload.

James Greenhalgh james.greenhalgh@arm.com
Fri Feb 1 17:43:00 GMT 2013


Hi,

push_reload takes an `enum reload_type' as its final argument.

On trunk we just cast the int we have to the correct type,
so we do that here to mirror trunk and correct the warning.
We can't fix this by changing the type of the argument we take
as we would then need to forward declare the enum when giving
the prototype, which is illegal.

This fixes the warning:

config/aarch64/aarch64.c: In function ‘aarch64_legitimize_reload_address’:
config/aarch64/aarch64.c:3641:6: warning: enum conversion when passing argument 11 of ‘push_reload’ is invalid in C++ [-Wc++-compat]

Regression tested aarch64-none-elf with no regressions.

OK for aarch64-4.7-branch?

Thanks,
James

---
gcc/

2013-02-01  James Greenhalgh  <james.greenhalgh@arm.com>

	* config/aarch64/aarch64.c
	(aarch64_legitimize_reload_address): Cast 'type' before
	passing to push_reload.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-AArch64-4.7-Fix-warning-aarch64_legitimize_reload_ad.patch
Type: text/x-patch
Size: 988 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20130201/522f9e99/attachment.bin>


More information about the Gcc-patches mailing list