From patchwork Thu Jul 18 15:36:39 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 2829689 Return-Path: X-Original-To: patchwork-linux-sparse@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BF7F7C0AB2 for ; Thu, 18 Jul 2013 15:36:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8FF9C2018C for ; Thu, 18 Jul 2013 15:36:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6CF892018A for ; Thu, 18 Jul 2013 15:36:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754643Ab3GRPgr (ORCPT ); Thu, 18 Jul 2013 11:36:47 -0400 Received: from mail-ye0-f171.google.com ([209.85.213.171]:56305 "EHLO mail-ye0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754515Ab3GRPgq (ORCPT ); Thu, 18 Jul 2013 11:36:46 -0400 Received: by mail-ye0-f171.google.com with SMTP id q14so988247yen.30 for ; Thu, 18 Jul 2013 08:36:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=tTcMR+Su4zhlMP+Q5hdMP8yIO+YFMpitlFiL8HjQ33c=; b=WR2oXpXFgniGhXODbUcAnN9mDQMQf3l/r4FMwkLFJPXYLmv3t0jwX+RswcDNdOeBiM bxgVhvlhXQUHP+LYaliE38ssD6PX+rjw59/2NX0jIy08Hn0wdQ2ghF9/rt1MkqQnPjwV +tpvdP6FauHeP4K/NhguflwqtFUj4XpKR6HKYH1MT53tvVl1UxASTY1gZJutBmEdlHUU dYUtaj/0z1RGNWSChAO+AR73HxPAN8BNtNJyhFtvFOVfLUBHb82+AqxJBaAWxl5izfRZ gNhAkuvwOCkuBGibce8fNZPpXhxCcbdClGV8rcC+eheUR6dHuk3GkEt8l+CpyNtwADqq lAeA== X-Received: by 10.236.92.7 with SMTP id i7mr5984924yhf.240.1374161805443; Thu, 18 Jul 2013 08:36:45 -0700 (PDT) Received: from salusa.poochiereds.net (cpe-107-015-124-230.nc.res.rr.com. [107.15.124.230]) by mx.google.com with ESMTPSA id e69sm15354277yhl.3.2013.07.18.08.36.43 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 18 Jul 2013 08:36:44 -0700 (PDT) From: Jeff Layton To: linux-sparse@vger.kernel.org Cc: Christopher Li , Pekka Enberg Subject: [PATCH] sparse: add __builtin_va_arg_pack() and __builtin_va_arg_pack_len() Date: Thu, 18 Jul 2013 11:36:39 -0400 Message-Id: <1374161799-2929-1-git-send-email-jlayton@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <20130718084743.727666bc@tlielax.poochiereds.net> References: <20130718084743.727666bc@tlielax.poochiereds.net> X-Gm-Message-State: ALoCoQl9Yem/cldTNYZpp6w1SqH8KXPEQ+hjdkiFmgbT757S54ELuNIEatCXXOSIpOaWeazHROtC 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=ham 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 this patch stops sparse from complaining about them not being defined: /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 Probably, there is some better way to do this that actually validates this function, but I'm not clear on how to do it. Signed-off-by: Jeff Layton --- lib.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib.c b/lib.c index 7e822eb..3f687ae 100644 --- a/lib.c +++ b/lib.c @@ -777,6 +777,7 @@ void declare_builtin_functions(void) add_pre_buffer("extern long __builtin_alpha_cmpbge(long, long);\n"); add_pre_buffer("extern long __builtin_labs(long);\n"); add_pre_buffer("extern double __builtin_fabs(double);\n"); + add_pre_buffer("extern __SIZE_TYPE__ __builtin_va_arg_pack_len(void);\n"); add_pre_buffer("extern void __sync_synchronize();\n"); add_pre_buffer("extern int __sync_bool_compare_and_swap(void *, ...);\n"); @@ -876,6 +877,7 @@ void create_builtin_stream(void) add_pre_buffer("#define __builtin_va_copy(dest, src) ({ dest = src; (void)0; })\n"); add_pre_buffer("#define __builtin_va_end(arg)\n"); add_pre_buffer("#define __builtin_ms_va_end(arg)\n"); + add_pre_buffer("#define __builtin_va_arg_pack()\n"); /* FIXME! We need to do these as special magic macros at expansion time! */ add_pre_buffer("#define __BASE_FILE__ \"base_file.c\"\n");