From owner-freebsd-hackers@freebsd.org Wed Jan 30 23:13:18 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A308413326BD for ; Wed, 30 Jan 2019 23:13:18 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E9F5489813 for ; Wed, 30 Jan 2019 23:13:16 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.15.2/8.15.2) with ESMTPS id x0UNDDrb033016 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Wed, 30 Jan 2019 15:13:13 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.15.2/8.15.2/Submit) id x0UNDDwr033015 for freebsd-hackers@freebsd.org; Wed, 30 Jan 2019 15:13:13 -0800 (PST) (envelope-from sgk) Date: Wed, 30 Jan 2019 15:13:13 -0800 From: Steve Kargl To: freebsd-hackers@freebsd.org Subject: Is libc C99 compliant? Message-ID: <20190130231313.GA27873@troutmask.apl.washington.edu> Reply-To: sgk@troutmask.apl.washington.edu MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.11.2 (2019-01-07) X-Rspamd-Queue-Id: E9F5489813 X-Spamd-Bar: ++++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [4.50 / 15.00]; HAS_REPLYTO(0.00)[sgk@troutmask.apl.washington.edu]; TO_DN_NONE(0.00)[]; REPLYTO_ADDR_EQ_FROM(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; RCVD_IN_DNSWL_MED(-0.20)[21.76.95.128.list.dnswl.org : 127.0.11.2]; MX_GOOD(-0.01)[cached: troutmask.apl.washington.edu]; FROM_EQ_ENVFROM(0.00)[]; IP_SCORE(0.17)[ip: (0.41), ipnet: 128.95.0.0/16(0.42), asn: 73(0.10), country: US(-0.07)]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:73, ipnet:128.95.0.0/16, country:US]; SUBJECT_ENDS_QUESTION(1.00)[]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(0.75)[0.755,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; NEURAL_SPAM_MEDIUM(0.94)[0.936,0]; RCPT_COUNT_ONE(0.00)[1]; AUTH_NA(1.00)[]; MIME_TRACE(0.00)[0:+]; NEURAL_SPAM_LONG(0.95)[0.950,0]; DMARC_NA(0.00)[washington.edu]; R_SPF_NA(0.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jan 2019 23:13:19 -0000 Originally sent to freebsd-standards@ and freebsd-toolchain@, but those list appear to be defunct. Is libc C99 compliant? -- steve ----- Forwarded message from Steve Kargl ----- Date: Wed, 30 Jan 2019 13:29:04 -0800 From: Steve Kargl To: freebsd-standards@freebsd.org, freebsd-toolchain@freebsd.org Subject: Is libc C99 compliant? User-Agent: Mutt/1.11.2 (2019-01-07) When building gcc file gcc/config/freebsd.c contains #define TARGET_LIBC_HAS_FUNCTION no_c99_libc_has_function In targhook.c, one finds /* By default we assume that c99 functions are present at the runtime, but sincos is not. */ bool default_libc_has_function (enum function_class fn_class) { if (fn_class == function_c94 || fn_class == function_c99_misc || fn_class == function_c99_math_complex) return true; return false; } bool no_c99_libc_has_function (enum function_class fn_class ATTRIBUTE_UNUSED) { return false; } Shouldi/can TARGET_LIBC_HAS_FUNCTION be updated to at least default_libc_has_function? More importantly now that libm contains sincos[fl], should FreeBSD gcc config file be updated to use bool bsd_libc_has_function (enum function_class fn_class) { if (fn_class == function_c94 || fn_class == function_c99_misc || fn_class == function_c99_math_complex || fn_class == function_sincos) return true; return false; } -- Steve ----- End forwarded message ----- -- Steve 20170425 https://www.youtube.com/watch?v=VWUpyCsUKR4 20161221 https://www.youtube.com/watch?v=IbCHE-hONow