From nobody Wed Jan 31 08:57:50 2024 X-Original-To: freebsd-arch@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TPwsr73KMz58nl7 for ; Wed, 31 Jan 2024 08:57:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TPwsr6X0Xz45y8; Wed, 31 Jan 2024 08:57:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706691472; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=e5GTy9bWLFSnpHQrm3E0e1YpiWIFG+qn/bbUKekvxrQ=; b=ihkBWq4BuD59bk1Xn6ZCzptTNVwo99vW5f47DdWPx7RbUz5GTOp3uHzbFfQx7BfjWtR3k4 48/c1E1zZvz+ybK7/ZVpMxA8qN+vMjfzlDuHT3rrjzbl3+EDBESU8BEc3mm417py3nEfM3 1MQl0OtHWgg+DSJFKCg1c+jo2bPGb4WuYQqHP6zfidw8G7tyjtBAu0u9p3llTtfW4jK21Y KvrEUKiTGH/g+P01Gj6k7qtWxKuclOfQhdJygKBwwvXmkdF84+9CnJeFiJXdClDOq2csfq NKZbW3cdLETKcjLYCdTDnCqLqqa+OVUL0R3Xyy1KSqyP+05FN6ntc0HmS5i05Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706691472; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=e5GTy9bWLFSnpHQrm3E0e1YpiWIFG+qn/bbUKekvxrQ=; b=oOX64uCfbPf107ibA69uKyqgnCOfpiXaNqSEVNwcTC0qmk+W4/QaXT5s/N7GP9gD4dQtBu PazZDq2WJLSMpsYa46Mmo+6aud0u8unTPyTEsH0LMnlIuxnV16Wk5tvLwG1HrL1pyoNkKc QL69uEoDkTdNyQcM3yNmrqqueXw13yLZECKzyMp3c2S9Q/QuBrJNA/Dgq6S+lPNkvXuybA ibaKKHv/4Rn1l345U4z/S8wgUqyqhPqy5ooy6+fe/5swEcKRZS2lhmxo9Hst6sWYGxn8xL PfZu+/MHBzuA9ZutIe9/XPfiDsYRJvYFXj/GWgqpkRGNRA+aRIlA7E1VFbeQ4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706691472; a=rsa-sha256; cv=none; b=SMcuc+qmzs8cw+X0+6+pKWal/RTd7GulnOG1yVMFlGWCHglprvk0nkOoBQS8ThrxrCltXd d6IWckWEYvdm2hCxTd0u8PM462XgnQ03sozDQFlTsgbjtRu/xa3PCHuA7KVGyF9Wx98YcT J4jgYGa1Gcb7P8KLPFzJMXnlL0q9jEQiVfdNrwinBmDmn3GW4VbLqZ/DeFsx/Gd2jj/8JZ ILZ7K6IMNWMiyXh652fKt/9+lMDLpE/71e+AfO5XmJb8vgl/hUJ0ZSn3qWluylduXVs9AC PfJRNQdc19MMISR3l5RLi7MRQIFeMQ5ML1TeOQUzG8S3+w5Fkmk2MxlKxJXuig== Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "tensor.andric.com", Issuer "R3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 4TPwsr4sT0zYwh; Wed, 31 Jan 2024 08:57:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtpclient.apple (longrow.home.andric.com [192.168.0.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 1617457032; Wed, 31 Jan 2024 09:57:51 +0100 (CET) Content-Type: text/plain; charset=us-ascii List-Id: Discussion related to FreeBSD architecture List-Archive: https://lists.freebsd.org/archives/freebsd-arch List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arch@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6.1.1\)) Subject: Re: improving C++ libc headers From: Dimitry Andric In-Reply-To: Date: Wed, 31 Jan 2024 09:57:50 +0100 Cc: lexi@le-fay.org, freebsd-arch Content-Transfer-Encoding: quoted-printable Message-Id: <89B65722-4397-41D1-971A-7C79C8C4A5FE@FreeBSD.org> References: To: Mark Millard X-Mailer: Apple Mail (2.3731.700.6.1.1) On 31 Jan 2024, at 05:03, Mark Millard wrote: >=20 > Lexi Winter wrote on > Date: Tue, 30 Jan 2024 13:30:54 UTC : >=20 >> i am considering working up a patch to improve C++ libc headers in = FreeBSD. >>=20 >> the problem with the current headers (which come from clang/libc++) = is >> that this code compiles: >>=20 >> ------ >> #include >> auto main() -> int { >> exit(0); >> } >> ------ >>=20 >> this should be a compile-time error, because does not = declare >> ::exit[0]. however, it works because is implemented like >> this: >=20 > While I like the removal of header pollution, various > C++ standard vintages have explicit wording that it is > not an error for "C++ headers for C library facilities" > (the for-C ones that are named) to be this way: >=20 > QUOTE of an example: > It is unspecified whether these names (. . .) are first > declared in the global namespace scope and are then > injected into namespace std by explicit using-declarations. > END QUOTE Yeah, this is completely unrealistic, and will break a huge amount of programs for little gain. -Dimitry