[PATCH 32/32] score: remove part of an assertion that cannot compile with Clang

Gedare Bloom gedare at rtems.org
Thu May 11 16:50:30 UTC 2017


On Thu, May 11, 2017 at 10:26 AM, Daniel Hellstrom <daniel at gaisler.com> wrote:
> From: Jacob Hansen <jacob.hansen at gaisler.com>
>
> ---
>  cpukit/score/include/rtems/score/threadqimpl.h | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/cpukit/score/include/rtems/score/threadqimpl.h b/cpukit/score/include/rtems/score/threadqimpl.h
> index 574221c..975221c 100644
> --- a/cpukit/score/include/rtems/score/threadqimpl.h
> +++ b/cpukit/score/include/rtems/score/threadqimpl.h
> @@ -1140,9 +1140,7 @@ typedef struct {
>  #define THREAD_QUEUE_OBJECT_ASSERT( object_type, wait_queue_member ) \
>    RTEMS_STATIC_ASSERT( \
>      offsetof( object_type, wait_queue_member ) \
> -      == offsetof( Thread_queue_Object, Wait_queue ) \
> -    && ( &( ( (object_type *) 0 )->wait_queue_member ) \
> -      == ( &( (Thread_queue_Object *) 0 )->Wait_queue ) ), \
> +      == offsetof( Thread_queue_Object, Wait_queue ), \
>      object_type \
>    )
>
Seems oK although it does lose some check. What was llvm/clangs
problem with the second condition?

> --
> 2.7.4
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel



More information about the devel mailing list