From owner-sc22wg14+sc22wg14-domo2=www.open-std.org@open-std.org  Sat Mar 30 16:42:48 2024
Return-Path: <owner-sc22wg14+sc22wg14-domo2=www.open-std.org@open-std.org>
X-Original-To: sc22wg14-domo2
Delivered-To: sc22wg14-domo2@www.open-std.org
Received: by www.open-std.org (Postfix, from userid 521)
	id 36E8E356DF4; Sat, 30 Mar 2024 16:42:48 +0100 (CET)
Delivered-To: sc22wg14@open-std.org
Received: from mimir.eigenstate.org (mimir.eigenstate.org [206.124.132.107])
	by www.open-std.org (Postfix) with ESMTP id 6E0B8356D53
	for <sc22wg14@open-std.org>; Sat, 30 Mar 2024 16:42:45 +0100 (CET)
Received: from mimir.eigenstate.org (localhost [127.0.0.1])
	by mimir.eigenstate.org (OpenSMTPD) with ESMTP id a697404f
	for <sc22wg14@open-std.org>;
	Sat, 30 Mar 2024 08:42:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=eigenstate.org; h=
	message-id:to:subject:date:from:mime-version:content-type
	:content-transfer-encoding; s=mail; bh=XRz/i5Hh2Ubt86QB+DkeApYhA
	ZE=; b=Aip/6WKHV+V9Z/ZtA70LOF3MpRR6Uor4AesnZ9yQBMYUJVs5TJQMLYl7Q
	u0/SWtyfIwD679B9eyJPEvjX1GHBrnRaMsMbZc7VTe4/58le9OTjsn7zcl7/+Ixh
	neGULJ4FR9PgFQdoDy8JIVvUb4duRM2UUmUA3vz8dm4Y0ApLZo=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=eigenstate.org; h=message-id
	:to:subject:date:from:mime-version:content-type
	:content-transfer-encoding; q=dns; s=mail; b=mpwSzHeZx6OmQ5rtPqI
	XbenD58muPLCYyjkiYKZnf9nlQBuUb4C/+mD8JZ1LHmGS15S5RNlcfahGcfYGate
	nCtlX/usWG8X7G5KGMP8/3pzUJGmuuQrnV2BNJdTBkyeK6ZYxx5SBbBXHaJhkmNA
	w248gTew//Ry5XlWi//iiHYA=
Received: from abbatoir (pool-108-6-24-2.nycmny.fios.verizon.net [108.6.24.2])
	by mimir.eigenstate.org (OpenSMTPD) with ESMTPSA id a4c0805a (TLSv1.2:ECDHE-RSA-AES256-SHA:256:NO)
	for <sc22wg14@open-std.org>;
	Sat, 30 Mar 2024 08:42:43 -0700 (PDT)
Message-ID: <8B35C6FBCC50BED225B38EC511CA28E7@eigenstate.org>
To: sc22wg14@open-std.org
Subject: 'extern thread_local'?
Date: Sat, 30 Mar 2024 11:42:41 -0400
From: ori@eigenstate.org
MIME-Version: 1.0
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit
Sender: owner-sc22wg14@open-std.org
Precedence: bulk

Michael Forney (maintainer of cproc) recently flagged this to me:

c23 6.9.3p1 says "If the declaration of an identifier for an object
has file scope and an initializer, or has file scope and storage-class
specifier thread_local, the declaration is an external definition for
the identifier."

Doesn't this mean that `extern thread_local int x;` is an external
definition?

mcf looked through the wg14 document log and found where that wording
was added (in n3108). The intention was to fix

	static thread_local int x;

which previously was neither a tentative definition or external
definition, but i don't think it considered extern thread_local.

I think this may be one of our first errata?

