From patchwork Thu Jul 18 12:47:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 2829632 Return-Path: X-Original-To: patchwork-linux-sparse@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D903B9F967 for ; Thu, 18 Jul 2013 12:47:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B73EB201EC for ; Thu, 18 Jul 2013 12:47:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3AF6E201E5 for ; Thu, 18 Jul 2013 12:47:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758652Ab3GRMrp (ORCPT ); Thu, 18 Jul 2013 08:47:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47173 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754507Ab3GRMrp (ORCPT ); Thu, 18 Jul 2013 08:47:45 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r6ICljNi002665 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 18 Jul 2013 08:47:45 -0400 Received: from tlielax.poochiereds.net (vpn-56-72.rdu2.redhat.com [10.10.56.72]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r6ICli9v023695 for ; Thu, 18 Jul 2013 08:47:44 -0400 Date: Thu, 18 Jul 2013 08:47:43 -0400 From: Jeff Layton To: linux-sparse@vger.kernel.org Subject: error: undefined identifier '__builtin_va_arg_pack' Message-ID: <20130718084743.727666bc@tlielax.poochiereds.net> Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 Sender: linux-sparse-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP I was running sparse on some code I maintain and saw a bunch of warnings like this: /usr/include/bits/stdio2.h:98:25: error: undefined identifier '__builtin_va_arg_pack' /usr/include/bits/stdio2.h:98:25: error: not a function It looks like gcc defines this in recent versions: http://gcc.gnu.org/onlinedocs/gcc/Constructing-Calls.html It seems like something like this might do the trick for __builtin_va_arg_pack_len: -----------------[snip]------------------ -----------------[snip]------------------ ...but I'm unclear on how best to fix the errors around __builtin_va_arg_pack since it doesn't seem to return a well-defined type. Thanks... diff --git a/lib.c b/lib.c index 7e822eb..db981d8 100644 --- a/lib.c +++ b/lib.c @@ -779,6 +779,7 @@ void declare_builtin_functions(void) add_pre_buffer("extern double __builtin_fabs(double);\n"); add_pre_buffer("extern void __sync_synchronize();\n"); add_pre_buffer("extern int __sync_bool_compare_and_swap(void *, ...);\n"); + add_pre_buffer("extern size_t __builtin_va_arg_pack_len(void);\n"); /* Add Blackfin-specific stuff */ add_pre_buffer(