[PATCH] powerpc: Fix compiler warning on some syscalls

Adhemerval Zanella azanella@linux.vnet.ibm.com
Thu Jan 8 13:13:00 GMT 2015


On 07-01-2015 21:31, Roland McGrath wrote:
> Using &foo[0] is fine, but I think it does need a comment in each place.
> It doesn't have to be a full explanation, just something short like:
> 	/* Avoid implicit array coercion in syscall macros.  */
> Otherwise someone will come along at some point and say, "&foo[0] is
> equivalent to foo in C, so I'll remove the superfluous operators."
> A more full explanation can go with the definition of INLINE_SYSCALL et al.
>
> It wouldn't hurt for at least some of those implementations to add a
> __builtin_classify_type check so that any array_type_class arguments to
> syscall macros (at least in machine-independent code) barf at compile time
> in a way that leads to seeing a comment that explains the situation.
>
>
> Thanks,
> Roland
>
I have added your comment suggestion and pushed upstream as 
dd6e8af6ba1b8a95a7f1dc7422e5ea4ccc7fbd93. 



More information about the Libc-alpha mailing list