[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/external/bsd/file
On Sat, Jan 18, 2014 at 10:33 AM, Martin Husemann
> On Fri, Jan 17, 2014 at 11:32:29PM +0000, David Laight wrote:
>> If the problem actually caused by gcc failing to pair all the conditionals?
>> Compiling with 'clazz' a compile-time constant might show things.
> I don't think so, and I'll leave a final fix to Christos as maintainer.
>> Or, if memcpy() is defined in a header file and uses casts to optimise
>> inlined copies of fixed sizes it might be that the pointer-aliasing
>> rules mean that the actual structure might not have been written.
> The copy is of the full size of the relevant structure, but through a
> (void*) pointer - sounds more like a gcc bug to me.
I believe gcc is correct here, you are only allowed to alias via a
char pointer or the original type. Because you put a void pointer in
instead gcc is right to complain.
Main Index |
Thread Index |