From owner-freebsd-toolchain@freebsd.org Tue Aug 18 04:42:55 2020 Return-Path: Delivered-To: freebsd-toolchain@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B0C2C3ADDC8 for ; Tue, 18 Aug 2020 04:42:55 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic304-23.consmr.mail.gq1.yahoo.com (sonic304-23.consmr.mail.gq1.yahoo.com [98.137.68.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BVyvf3N6Zz4j0h for ; Tue, 18 Aug 2020 04:42:54 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: i9qatKIVM1msp9JqfB6uriQXXIUIqzx4wboKZkLdmv0XBiuJmH62hvKrfLAK5mj 8eHiYNuSbN9PLq1BSLc9JesGY4F6nBkIv63fhJsC4rbxAHbgoBs2F_0kyT_yD_QQOj.tGQokki2v Ywr_wXFHa.62w.7AOEHwHX8TvXPQ2VueixBEtyVwzZq7peTV7s7NhuT_d3dSaoxzH4zyWCVCftDq GcwOTZh6aFZBWKLL.gPcHo9ATE96gxy5cKXkDKtbQM.ZAcAuz.2ohqYuuxGiahh71lOINzCmWQEa IVc_8PPfFL1.hZrOuNOz.SzJymFot3M0EDpbCBzc83822LC710bXAfp0Bz7W9ycBtc2UxElwdlOL 3NO8Ye5aePI58tC4HSjGsUhKhNS_EznIkLSy0_XiCIS03fgv807iiD1kAFwT7zYxPaXaUneQzn8J pcT3fwGPlHNkDua2lJb69zm494SPKiF3JJA8N5zSL0GTDM0sbmKjwiBbkeH_tShp2zlJ2utGKV_Q MKLi1gFYHwF3KicXwXc_p.XsUu8p_78jKg3JkJZV6eLAHpOH0bu4ZIReQ94q2dJaVyHMfrOOEX4r KMScUhWZrAr_QGA_7IgV3ye.YfsBcfVg3ih3o1EYTjYtszyRW46mbFHMIhTBWtNRbTrTJ.S6XBK2 jhjc5Br61Ds5SvTu4BogrCu.svr.PON_3zddJ8dybpOHCnDkTi_VUwryLOo4RNvMJeRcV_wEpcgl eF91Gp8sEDUiBUxdW3T4sQT0MF68SW07BBsYmf7IQZr0NGTV0XZEgSe2eu6DyHu5gNPfPQtHuOHU Ek7B2tLY26iEl1nGIuE46L5iEuh1JMiplx.f6q4lmEsrczwUBOEQ20i5ssPeGBA61FjqC1httw1V bTcDMwuO2Lccm4QEgMvmsnODJY6ZnZCmuOC4phqy7zI.YmUwXm9RE.pqvsrsW_ZuknZqBAcHMtPk g79UAMjkK2YFYcEmVMfBo6lCsXUq8J3vWRRQiTKUh.CJJM6_W_2eIDozSNktUTh1nJg9.sdJ1hCW kTXF6JI7nR2RTiyQMqBs4hXVPedMXiNqENTY0LNdkiyiy7LYRUtmkFnSERqKgNHy0re_Xacazw99 E3zd8YsUZ.sm62s32f2Eh4137c8gA6TMl.D1uuPNtBu7eAiGwes8qTYKTJrsNTRixuPmTl7aBQMK ffhchPhYQjGQHznOOAccGpEvynABVu.bDt.os4m_dP0GJUdLyzEw8OqGoZOzVofw0ulIexCq2NAv 4ZFvDeomdxB68KOBBt4vEmrRpzsYjeMBq7rtYz2y4RZZU3XwiFNxFgZ9VQyDr6y23zrIGArxbOo9 6uPdAqWipC85nobHJb7iqdxz0cQGhtlO_fab.shEonFS0ZDcTfQrXKloRj.Sq0dnp5C4voGPCwAQ ImAfXaVWd4U4mMZEv7lBUbFbrm0AJGte9ZpM7xIWMqY_oUwVg31YrQJoNmTUHbx8AJuSQ0Qm_j71 vi1.ULMDmFr4RafzaBEhFJJll_ac- Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.gq1.yahoo.com with HTTP; Tue, 18 Aug 2020 04:42:52 +0000 Received: by smtp421.mail.ne1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 61024815e016ada32ed3a8b144d8a283; Tue, 18 Aug 2020 04:42:50 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.1\)) Subject: CPU_FFS, its ffsl use, and the need for including if using "ISO" compiler modes Message-Id: <5C4EB8F3-F184-4FC0-82CD-4A0B8CFCAF9D@yahoo.com> Date: Mon, 17 Aug 2020 21:42:49 -0700 To: FreeBSD Current , FreeBSD Toolchain X-Mailer: Apple Mail (2.3608.120.23.2.1) References: <5C4EB8F3-F184-4FC0-82CD-4A0B8CFCAF9D.ref@yahoo.com> ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1597725775; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: references:references:dkim-signature; bh=9ombrryWbh9/52rLI5hXm6gsymlyrhbwdizZ4LNevd0=; b=Ss758tNsbwxY8mevwpj3EV2CuPLL8h44V1s5nA8jiBrMc3P96esnDmg0trf1/gr4BfNPyM JJ+uLGArs0tKbdbCY1YK02GDmoAT42vIcs6iKjSxaLq9hG1264wuVdVoGcya1i5W/dBI+U bNTiCoHbtwOwDWKuunJshM9eI2T8ryxSQQG3tRfuGbAquYIbKjgIp1vN4dJhOmfMYLp1TC nfPWK3IxrUHOHlDeYl6gpGI3z+EhYE8IjG3jhkqE97FBnsdWkQnJBoJNo+ncLc2WRNeeWa aSoNGVx5+/oacUkOSpp+XAuDvn0j0zzotoaaQvteTBycjZ+dKziso1GimgilWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1597725775; a=rsa-sha256; cv=none; b=aMMGSP+uc0L6IQwjsI9J8mfVIU2e3Zu7xuMXxf4ABh0rBzRhz1lZtjLfTkkNoDCSyrm7y4 qhTOo/ru8vCX8AgvjwIrL8+1Ls0SdNks1GDy5tlbQbU7jM6xj6wVqGnJ5mjwuOI96X4qeg SodvQ5KWaJr8WmxK7v6mMNv12sfCPm6Kh2BlDRjYuL2SOI+w9nHPjWnJoWt8SzyRkpnRxp tw3dcigOyIn7NRBedgF78MpArT+DHxlc25tHN7hQB9+u8hymT145W5XcE5XvzMXyQbTl6h JrtjoJjDk6b02AP6maH4ycIajiBwvFWo324i7QfhfXTicJ4ONp0xDc0CSCaSgw== ARC-Authentication-Results: i=1; mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=A+0a76ky; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.68.204 as permitted sender) smtp.mailfrom=marklmi@yahoo.com X-Rspamd-Queue-Id: 4BVyvf3N6Zz4j0h X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.21 / 15.00]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; ARC_SIGNED(0.00)[i=1]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-0.74)[-0.744]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.98)[-0.983]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.99)[-0.986]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.68.204:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.68.204:from]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Aug 2020 04:42:55 -0000 In a aarch64 head -r363590 context with g++9 from ports in use (so ffsl is only compiler-defined outside strict ISO modes) . . . I got a compile failure for using CPU_FFS because ffsl "was not declared". My code was being compiled via -std=c++17 . (Other than enabling one feature, it is not system specific code overall.) Well, it turns out that /usr/include/sys/bitset.h is indirectly used by /usr/include/sys/cpuset.h and bitset.h has use of ffsl in BIT_FFS but bitset.h does nothing to cause use of a: #include to pick up the FreeBSD's libc declaration of the ffsl routine. (There are other "bit string" routines with similar issues.) Nor does "man 2 cpuset" or /usr/include/sys/cpuset.h or /usr/include/sys/bitset.h explicitly suggest the potential need for including to declare things used by the header files that are mentioned in those places. I'll note that g++10 did not object before this change. But I had reason to also build using g++9 . [Compiling the -updated code with g++10 did not complain. Nor did linking the results complain.] Note: The c++17 code involved is not part of a FreeBSD port. === Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)