From owner-sc22wg14+sc22wg14-domo2=www.open-std.org@open-std.org  Wed Apr  5 01:25:20 2017
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 30E2835886E; Wed,  5 Apr 2017 01:25:19 +0200 (CEST)
Delivered-To: sc22wg14@open-std.org
Received: from mail-io0-f171.google.com (mail-io0-f171.google.com [209.85.223.171])
	(using TLSv1 with cipher AES128-SHA (128/128 bits))
	(No client certificate requested)
	by www.open-std.org (Postfix) with ESMTP id 49544356E08
	for <sc22wg14@open-std.org>; Wed,  5 Apr 2017 01:25:16 +0200 (CEST)
Received: by mail-io0-f171.google.com with SMTP id l7so105495333ioe.3
        for <sc22wg14@open-std.org>; Tue, 04 Apr 2017 16:25:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=from:subject:to:message-id:date:user-agent:mime-version
         :content-transfer-encoding;
        bh=wHD0QlzgEShQNRozQbIZ+zkZeGaOHPmoPRTewwTpxcg=;
        b=A/aiGlKNV4gf/WjHqYiMsIy4vzWYQYLG9V4VjXTa102UXyI9aJJmvbLsQBhyIePqbT
         cFkZqESd+HANkmPLFW0Gc/MiHIZimeBfwyjvBPnPMHdVgWLZtf5BRn8TNqVgCEgEBppc
         gZkIDSn4QBBHyNDikSBEIVlAKGDei1u+7Zc0M/TRXZ/BcRr0nw0ghNPNgccgg9FPRsgc
         033VppXyzeh+ZMIpemUPq16N+NZm8UAmu+Jx8e7MUnR7gTnD/9roPkdfe6FrcJlizLnh
         DInfAw8xtgY3Vi4t9BcX95I50M1YEdJTC+/3EHSA+sj3kqni59UqSK+aooElcDMVaB7Q
         WFeA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:subject:to:message-id:date:user-agent
         :mime-version:content-transfer-encoding;
        bh=wHD0QlzgEShQNRozQbIZ+zkZeGaOHPmoPRTewwTpxcg=;
        b=o6liw9Ej8A1elfDIzT0DJlGGeZRe/AofG54jCEoH+k7b/Pqf2w8MzkvoNTy7GChjiC
         71xXEZpJcrmpFMcikhfqUW/QP0H8QK6sVXcY4CxrD1B6aONPK0O8FVNIVG4TJkHMBQgE
         +9Tc+PaH7o3k3eqDcElj090E/a5pSSfg6SE10rmt+GkVv47MjrQPIqszmqNHCS9GWBxT
         sLEJUIOYXXmv9KxIHitL4QScUXVx4zzGonLBx94vxIReKt8z0k7R/PCu4NEeQxkhG2BP
         x+/OXP4bm+PrWLwCrWRD2vhVmmnUJGt1c4zo0sqgH0n+ev88VAQ8GTm8fogJW/vBGJtW
         AD9w==
X-Gm-Message-State: AFeK/H2cwG74tPw8UR5pXyh3pcHLJUJERCNQqc+uB2/ub8ERPklLbGAFeAut2cpElWJrgg==
X-Received: by 10.107.59.149 with SMTP id i143mr25775190ioa.196.1491348314905;
        Tue, 04 Apr 2017 16:25:14 -0700 (PDT)
Received: from [192.168.0.253] ([173.243.43.130])
        by smtp.gmail.com with ESMTPSA id l129sm12143808ite.1.2017.04.04.16.25.13
        for <sc22wg14@open-std.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Tue, 04 Apr 2017 16:25:13 -0700 (PDT)
From: Martin Sebor <msebor@gmail.com>
Subject: DR 485 wording for TC 2017
To: sc22wg14@open-std.org
Message-ID: <55bd3d70-9fdc-5e7a-cab9-6c22d138b4a2@gmail.com>
Date: Tue, 4 Apr 2017 17:25:12 -0600
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
 Thunderbird/45.4.0
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Sender: owner-sc22wg14@open-std.org
Precedence: bulk

During today's discussion of DR 485 I volunteered to write up proposed 
words to include in the upcoming 2017 C TC/update to reflect WG14's
position on the future direction in this area.

The suggested changes do two things.  Change (1) acknowledges that
the macro can only be used to initialize scalars, updates Future
Library directions with the expected removal of the ATOMIC_VAR_INIT
macro, and adds a footnote to 7.17.2.1 pointing to the Future Library
Directions section.  Going a step further, (2) is the minimum change
necessary to make direct initialization of atomic objects work.

Change 1.

In 7.17.2.1 The ATOMIC_VAR_INIT macro, change paragraph 2 as follows:

The ATOMIC_VAR_INIT macro expands to a token sequence suitable for
initializing an atomic object of a <ins>scalar</ins> type that is
initialization-compatible with value.<ins> new footnote</ins>

<ins>new footnote) An atomic object of any type can be initialized
the same way as an object of the corresponding non-atomic type.  See
future library directions.</ins>

Add a new paragraph to 7.31.8 Atomics <stdatomic.h>:

The macro ATOMIC_VAR_INIT() cannot be used to explicitly initialize
objects of user-defined types.  Since the macro is not necessary to
initialize objects of any atomic types it will be removed in a future
revision of the standard.


Change 2.

In 7.17.2.1 The ATOMIC_VAR_INIT macro, further modify paragraph 2
as follows:

An atomic object with automatic storage duration that is not
explicitly initialized <del>using ATOMIC_VAR_INIT</del> is initially
in an indeterminate state;

