This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] powerpc: Fix compiler warning on some syscalls


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. 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]