Date: Wed, 28 Sep 2011 22:26:12 -0700 From: Chuck Swiger <cswiger@mac.com> To: "Klaus T. Aehlig" <aehlig@linta.de> Cc: ports@freebsd.org, ehaupt@FreeBSD.org Subject: Re: clang and configure checking for equivalent simple type Message-ID: <F0B4A636-116E-4CA7-A07B-118AB5AC6ABC@mac.com> In-Reply-To: <20110929045818.GA3463@curry.linta.de> References: <20110929045818.GA3463@curry.linta.de>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi--
On Sep 28, 2011, at 9:58 PM, Klaus T. Aehlig wrote:
> However, I assume that these kind of tests are quite widespread in configure
> scripts, so I wonder what to do about this. Possible options include
>
> - adding 'CFLAGS+= -Wno-unused' just for this port
>
> - do nothing, but recommend users to have -Wno-unused in CFLAGS when using clang
> (maybe somewhere in the handbook)
>
> - check with portmgr@ if adding -Wno-unused to the default CFLAGS (for clang?)
> is an option
>
> - something completely different??
> (like: add an appropriate entry to my /etc/make.conf and don't care)
>
> Any suggestions?
Are you sure that you don't have -Werror being set somehow? I don't have a FreeBSD-9 system handy at the moment, but that code ought to compile under clang (with warnings, sure, but the result runs):
% clang -o t t.c
t.c:6:20: warning: comparison of distinct pointer types ('off_t *' (aka 'long long *') and 'long *')
off_t u; long v; &u==&v;
~~^ ~~
t.c:6:20: warning: expression result unused [-Wunused-value]
off_t u; long v; &u==&v;
~~^ ~~
2 warnings generated.
% ./t ; echo $?
0
% clang --version
Apple clang version 2.0 (tags/Apple/clang-137) (based on LLVM 2.9svn)
Regards,
--
-Chuck
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F0B4A636-116E-4CA7-A07B-118AB5AC6ABC>
