From patchwork Wed Mar 11 23:19:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Stefaniuc X-Patchwork-Id: 5989231 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0A0029F318 for ; Wed, 11 Mar 2015 23:19:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3FC6020398 for ; Wed, 11 Mar 2015 23:19:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 47CA120396 for ; Wed, 11 Mar 2015 23:19:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752267AbbCKXTV (ORCPT ); Wed, 11 Mar 2015 19:19:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40925 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752099AbbCKXTV (ORCPT ); Wed, 11 Mar 2015 19:19:21 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t2BNJKSX021139 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 11 Mar 2015 19:19:20 -0400 Received: from brasov.str.redhat.com (brasov.str.redhat.com [10.33.193.1]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t2BNJKIk029872 for ; Wed, 11 Mar 2015 19:19:20 -0400 Received: by brasov.str.redhat.com (Postfix, from userid 2500) id A4031A0495; Thu, 12 Mar 2015 00:19:19 +0100 (CET) Date: Thu, 12 Mar 2015 00:19:19 +0100 From: Michael Stefaniuc To: linux-sparse@vger.kernel.org Subject: [PATCH] Add the __builtin functions needed for INFINITY and nan(). Message-ID: <20150311231919.GA14617@redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Sender: linux-sparse-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 Signed-off-by: Michael Stefaniuc --- Needed for Wine. Not all of those but have added them for completeness. lib.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib.c b/lib.c index 8dc5bcf..58a7f2e 100644 --- a/lib.c +++ b/lib.c @@ -876,6 +876,17 @@ void declare_builtin_functions(void) add_pre_buffer("extern int __builtin_islessgreater(float, float);\n"); add_pre_buffer("extern int __builtin_isunordered(float, float);\n"); + /* And some INFINITY / NAN stuff.. */ + add_pre_buffer("extern double __builtin_huge_val(void);\n"); + add_pre_buffer("extern float __builtin_huge_valf(void);\n"); + add_pre_buffer("extern long double __builtin_huge_vall(void);\n"); + add_pre_buffer("extern double __builtin_inf(void);\n"); + add_pre_buffer("extern float __builtin_inff(void);\n"); + add_pre_buffer("extern long double __builtin_infl(void);\n"); + add_pre_buffer("extern double __builtin_nan(const char *);\n"); + add_pre_buffer("extern float __builtin_nanf(const char *);\n"); + add_pre_buffer("extern long double __builtin_nanl(const char *);\n"); + /* And some __FORTIFY_SOURCE ones.. */ add_pre_buffer ("extern __SIZE_TYPE__ __builtin_object_size(void *, int);\n"); add_pre_buffer ("extern void * __builtin___memcpy_chk(void *, const void *, __SIZE_TYPE__, __SIZE_TYPE__);\n");