12 Feb 2011 18:33
cvs commit: tng/source/include byteorder.h tng_misc.h
elrond 2011/02/12 18:33:35 CET Modified files: source/include byteorder.h tng_misc.h Log: Fix strict aliasing warnings: STRIP_CONST and byteorder macros gcc 4.4 gives us a lot of warnings about strict aliasing issues. Most of them are due to two things: 1) the byteorder macros (SIVAL for example), which partly use very tricky casts to create optimized code on i386. Until we have new optimized code, we'll use the generic code everywhere. 2) STRIP_CONST needs to do tricky casts anyway. I have rewritten it to use uintptr_t (an integer large enough to hold a pointer). It's not yet exactly clear, where we want to go with stdint.h portability (which is needed for uintptr_t). Currently we use a gnulib autoconf library to create a local wrapping "sambatng-int.h". This fixes most of the new warnings. Revision Changes Path 1.7 +0 -6; commitid: INiJDFpH5QzY5Z7v; tng/source/include/byteorder.h 1.11 +4 -9; commitid: INiJDFpH5QzY5Z7v; tng/source/include/tng_misc.h(Continue reading)
RSS Feed