Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 May 2012 15:57:48 GMT
From:      Hartmut Brandt <harti@FreeBSD.org>
To:        current@freebsd.org
Subject:   Syntax error in malloc_np.h
Message-ID:  <201205211557.q4LFvmP8031660@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

Hi,

it seems that there is a syntax error in malloc_np.h. It contains lines like:

int	allocm(void **ptr, size_t *rsize, size_t size, int flags)
    __attribute__(nonnull(1));

The problem is that the syntax of the attributes actually requires two
parenthesis:

    __attribute__((nonnull(1)));

Our gcc seems to swallow either of both, but gcc47 chokes on the missing
'(' as does clang++.

Given that we have __nonnull(x) in cdefs.h I suppose the above is better
replaced with __nonnull(1)?

harti



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205211557.q4LFvmP8031660>