From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: William S Fulton Newsgroups: gmane.lisp.guile.bugs,gmane.comp.programming.garbage-collection.boehmgc Subject: bug#18711: Numerous unknown attribute '__alloc_size__' warnings when using clang Date: Tue, 14 Oct 2014 08:10:45 +0100 Message-ID: <543CCC75.6070407@fultondesigns.co.uk> References: <543C3C95.5050502@fultondesigns.co.uk> <871tqbgvca.fsf@yeeloong.lan> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1413270687 15876 80.91.229.3 (14 Oct 2014 07:11:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 14 Oct 2014 07:11:27 +0000 (UTC) Cc: bdwgc@lists.opendylan.org, 18711@debbugs.gnu.org To: Mark H Weaver Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Tue Oct 14 09:11:21 2014 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XdwGO-0006Zs-Ab for guile-bugs@m.gmane.org; Tue, 14 Oct 2014 09:11:20 +0200 Original-Received: from localhost ([::1]:36890 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XdwGN-0005E4-HP for guile-bugs@m.gmane.org; Tue, 14 Oct 2014 03:11:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47702) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XdwGF-0005Dq-8p for bug-guile@gnu.org; Tue, 14 Oct 2014 03:11:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XdwG6-0005wO-SS for bug-guile@gnu.org; Tue, 14 Oct 2014 03:11:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51560) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XdwG6-0005wK-OC for bug-guile@gnu.org; Tue, 14 Oct 2014 03:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XdwG5-0006pL-P0 for bug-guile@gnu.org; Tue, 14 Oct 2014 03:11:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: William S Fulton Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Tue, 14 Oct 2014 07:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18711 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 18711-submit@debbugs.gnu.org id=B18711.141327065226229 (code B ref 18711); Tue, 14 Oct 2014 07:11:01 +0000 Original-Received: (at 18711) by debbugs.gnu.org; 14 Oct 2014 07:10:52 +0000 Original-Received: from localhost ([127.0.0.1]:43124 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XdwFv-0006ox-8r for submit@debbugs.gnu.org; Tue, 14 Oct 2014 03:10:51 -0400 Original-Received: from mail-wi0-f179.google.com ([209.85.212.179]:41672) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XdwFr-0006oj-8E for 18711@debbugs.gnu.org; Tue, 14 Oct 2014 03:10:48 -0400 Original-Received: by mail-wi0-f179.google.com with SMTP id d1so9282152wiv.6 for <18711@debbugs.gnu.org>; Tue, 14 Oct 2014 00:10:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=aJze0t/S4hu2efUgs0RuRFxKVsWl7RRZ26imHNgL+Q8=; b=BB+DoTscpoM0CmwmTQ1Xl4Ri7nZ1rUxabn34YcR++dhlU47WFU2TNg1r5SBb85pdbU f1nBDlwZgY032gUNvrT6rAihV50tEu9Qe4cLP7FoZmG7zbDpvXCUDJqS5FospUpZbW+9 PTzqqEFSRa+ViF2Ggu98Uce4OCHXMjDdenCT7sAszwmDoVs+Nt/jOEJMcNvPws7EkAwf nepH9adbXcJ0xaiiWjdMYdUZFJPGtl+pEWNnDzIdJgeYy/qLZU8WobD2rzzxFsNi6wR/ CD2Hk/235IMOjQ0KkwXpVF96KAtLhCyUH6RTn8JibtY08dxpRpK/mJg4kYhMNh3YmmnN 4SyA== X-Gm-Message-State: ALoCoQkOqKEvKnXLSgOqJnFFABzXehwwC94ZU5HpCnZA+eHaHFFoWgBF8nf9+n4QhxFNEbjzsj3+ X-Received: by 10.194.206.72 with SMTP id lm8mr3316199wjc.70.1413270646539; Tue, 14 Oct 2014 00:10:46 -0700 (PDT) Original-Received: from [192.168.42.254] (genkt-056-179.t-mobile.co.uk. [149.254.56.179]) by mx.google.com with ESMTPSA id wc7sm12227447wjc.8.2014.10.14.00.10.44 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Oct 2014 00:10:45 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 In-Reply-To: <871tqbgvca.fsf@yeeloong.lan> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:7612 gmane.comp.programming.garbage-collection.boehmgc:6001 Archived-At: Thanks for analysing and pointing in the right direction Mark. With this info I found https://github.com/ivmai/bdwgc/commit/8fc1f3b61b02320848b035ccccd59e04e77d3f6b#diff-b3f85dde7694cbd1268ea9ed20db1b1aR244 which looks like it fixes it in the next release of bdwgc (7.5). Unfortunately this warning fails our tests as the build log is too big (this warning leads to > 4GByte build logs as the header is used in hundreds of our tests), so I'll suppress it some other way until 7.5 is released. William On 14/10/14 04:53, Mark H Weaver wrote: > [Forwarding this bug report to bdwgc@lists.opendylan.org] > > William S Fulton writes: > >> A simple >> >> #include >> >> generates the numerous warnings given below: >> >> >> In file included from example_wrap.c:702: >> In file included from /usr/local/Cellar/guile/2.0.11_1/include/guile/2.0/libguile.h:37: >> In file included from /usr/local/Cellar/guile/2.0.11_1/include/guile/2.0/libguile/async.h:28: >> In file included from /usr/local/Cellar/guile/2.0.11_1/include/guile/2.0/libguile/threads.h:36: >> In file included from /usr/local/Cellar/guile/2.0.11_1/include/guile/2.0/libguile/pthread-threads.h:33: >> In file included from /usr/local/Cellar/guile/2.0.11_1/include/guile/2.0/libguile/bdw-gc.h:47: >> /usr/local/Cellar/bdw-gc/7.4.2/include/gc/gc.h:411:23: warning: unknown attribute '__alloc_size__' ignored [-Wattributes] >> GC_API GC_ATTR_MALLOC GC_ATTR_ALLOC_SIZE(1) void * GC_CALL >> ^ >> /usr/local/Cellar/bdw-gc/7.4.2/include/gc/gc_config_macros.h:249:54: note: expanded from macro 'GC_ATTR_ALLOC_SIZE' >> # define GC_ATTR_ALLOC_SIZE(argnum) __attribute__((__alloc_size__(argnum))) >> ^ > This is clearly an issue with bdwgc on clang, and possibly only on > Apple's version of clang. Here's the relevant section of > gc/gc_config_macros.h from bdwgc 7.4.2: > > --8<---------------cut here---------------start------------->8--- > #ifndef GC_ATTR_ALLOC_SIZE > /* 'alloc_size' attribute improves __builtin_object_size correctness. */ > /* Only single-argument form of 'alloc_size' attribute is used. */ > # if defined(__GNUC__) && (__GNUC__ > 4 \ > || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3 && !defined(__ICC)) \ > || __clang_major__ > 3 \ > || (__clang_major__ == 3 && __clang_minor__ >= 2)) > # define GC_ATTR_ALLOC_SIZE(argnum) __attribute__((__alloc_size__(argnum))) > # else > # define GC_ATTR_ALLOC_SIZE(argnum) > # endif > #endif > --8<---------------cut here---------------end--------------->8--- > > You can see that the bdwgc developers have made an effort to check both > GCC and clang version numbers before using the __alloc_size__ attribute. > The code above seems to suggest that they believed clang 3.2 or later > supported this attribute, whereas your version of clang seems to be > based on upstream clang 3.5. Perhaps Apple removed support for this > attribute from their clang? > > In any case, this needs to be taken up with the bdwgc developers. > > Regards, > Mark > > >> System information: >> >> $ guile --version | head -n 1 >> guile (GNU Guile) 2.0.11 >> >> $ clang --version >> Apple LLVM version 6.0 (clang-600.0.51) (based on LLVM 3.5svn) >> Target: x86_64-apple-darwin13.4.0 >> Thread model: posix >> >> $ xcodebuild -version -sdk | head -n 2 >> MacOSX10.9.sdk - OS X 10.9 (macosx10.9) >> SDKVersion: 10.9 >> >> $ sw_vers >> ProductName: Mac OS X >> ProductVersion: 10.9.5 >> BuildVersion: 13F34 >> >> $ uname -a >> Darwin itako16071.miso 13.4.0 Darwin Kernel Version 13.4.0: Sun Aug 17 >> 19:50:11 PDT 2014; root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64