From owner-freebsd-ports@FreeBSD.ORG Thu Sep 29 05:26:24 2011 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60255106564A for ; Thu, 29 Sep 2011 05:26:24 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from asmtpout024.mac.com (asmtpout024.mac.com [17.148.16.99]) by mx1.freebsd.org (Postfix) with ESMTP id 48EE18FC12 for ; Thu, 29 Sep 2011 05:26:24 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from [17.153.38.155] by asmtp024.mac.com (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPSA id <0LS9009OSR3RYO60@asmtp024.mac.com>; Wed, 28 Sep 2011 22:26:23 -0700 (PDT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.4.6813,1.0.211,0.0.0000 definitions=2011-09-29_03:2011-09-29, 2011-09-29, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=6.0.2-1012030000 definitions=main-1109280409 From: Chuck Swiger In-reply-to: <20110929045818.GA3463@curry.linta.de> Date: Wed, 28 Sep 2011 22:26:12 -0700 Message-id: References: <20110929045818.GA3463@curry.linta.de> To: "Klaus T. Aehlig" X-Mailer: Apple Mail (2.1084) Cc: ports@freebsd.org, ehaupt@FreeBSD.org Subject: Re: clang and configure checking for equivalent simple type X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2011 05:26:24 -0000 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