From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5250 invoked by alias); 5 Jun 2018 22:20:05 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 4586 invoked by uid 89); 5 Jun 2018 22:20:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS,UPPERCASE_50_75 autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 05 Jun 2018 22:20:03 +0000 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8DD6D3082044; Tue, 5 Jun 2018 22:20:02 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-117-37.ams2.redhat.com [10.36.117.37]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2B66D308BDA9; Tue, 5 Jun 2018 22:20:02 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id w55MJxOM029019; Wed, 6 Jun 2018 00:19:59 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id w55MJvhc029018; Wed, 6 Jun 2018 00:19:57 +0200 Date: Tue, 05 Jun 2018 22:20:00 -0000 From: Jakub Jelinek To: Martin Sebor Cc: Gcc Patch List Subject: Re: [PATCH] add support for strnlen (PR 81384) Message-ID: <20180605221957.GF14160@tucnak> Reply-To: Jakub Jelinek References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) X-IsSubscribed: yes X-SW-Source: 2018-06/txt/msg00271.txt.bz2 On Tue, Jun 05, 2018 at 03:43:17PM -0600, Martin Sebor wrote: > --- a/gcc/builtins.def > +++ b/gcc/builtins.def > @@ -733,6 +733,7 @@ DEF_EXT_LIB_BUILTIN (BUILT_IN_STRNCASECMP, "strncasecmp", BT_FN_INT_CONST_STR > DEF_LIB_BUILTIN (BUILT_IN_STRNCAT, "strncat", BT_FN_STRING_STRING_CONST_STRING_SIZE, ATTR_RET1_NOTHROW_NONNULL_LEAF) > DEF_LIB_BUILTIN (BUILT_IN_STRNCMP, "strncmp", BT_FN_INT_CONST_STRING_CONST_STRING_SIZE, ATTR_PURE_NOTHROW_NONNULL_LEAF) > DEF_LIB_BUILTIN (BUILT_IN_STRNCPY, "strncpy", BT_FN_STRING_STRING_CONST_STRING_SIZE, ATTR_RET1_NOTHROW_NONNULL_LEAF) > +DEF_LIB_BUILTIN_CHKP (BUILT_IN_STRNLEN, "strnlen", BT_FN_SIZE_CONST_STRING_SIZE, ATTR_PURE_NOTHROW_NONNULL_LEAF) strnlen isn't a C89, C99 nor C11 function, so I think it should be DEF_EXT_LIB_BUILTIN like e.g. stpcpy, not DEF_LIB_BUILTIN. And not really sure it is worth adding the CHKP stuff when it will be just more work for Martin Liska to remove it again. Jakub