Title 2441. Exact-width atomic typedefs should be provided
Status wp Section [atomics.types.generic]
Submitter Stephan T. Lavavej

Created on 2014-10-01.00:00:00 by admin, last changed by admin.

msg7564 (view) Date: 2015-10-15.18:54:55

Proposed resolution:

This wording is relative to N3936.

  1. Change [atomics.types.generic] p8 as depicted:

    -8- There shall be atomic typedefs corresponding to the typedefs in the header <inttypes.h> as specified in Table 147. atomic_intN_t, atomic_uintN_t, atomic_intptr_t, and atomic_uintptr_t shall be defined if and only if intN_t, uintN_t, intptr_t, and uintptr_t are defined, respectively.

  2. Change [atomics.types.operations.req], Table 147 ("atomic <inttypes.h> typedefs"), as depicted:

    Table 147 — atomic <inttypes.h> typedefs
    Atomic typedef <inttypes.h> type
    atomic_int8_t int8_t
    atomic_uint8_t uint8_t
    atomic_int16_t int16_t
    atomic_uint16_t uint16_t
    atomic_int32_t int32_t
    atomic_uint32_t uint32_t
    atomic_int64_t int64_t
    atomic_uint64_t uint64_t
msg7391 (view) Date: 2015-10-15.18:54:55

[ 2015-10 pre-Kona ]

SG1 hands this over to LWG for wording review

msg7235 (view) Date: 2015-05-08.04:23:26

[ 2015-05 Lenexa, SG1 response ]

Move to SG1-OK status. This seems like an easy short-term fix. We probably need a paper on C/C++ atomics compatibility to deal with _Atomic, but that's a separable issue.

msg7205 (view) Date: 2015-03-22.18:20:19

[ 2015-02 Cologne ]

AM: I think this is still an SG1 issue; they need to deal with it before we do.

msg7201 (view) Date: 2014-11-15.00:00:00

[ 2014-11-25, Hans comments ]

There is no _Atomic in C++. This is related to the much more general unanswered question of whether C++17 should reference C11, C99, or neither.

msg7135 (view) Date: 2014-11-24.15:48:19

[ 2014-11, Urbana ]

Typedefs were transitional compatibility hack. Should use _Atomic macro or template. E.g. _Atomic(int8_t). BUT _Atomic disappeared!

Detlef will look for _Atomic macro. If missing, will open issue.

msg7134 (view) Date: 2014-10-09.18:52:19

<atomic> doesn't provide counterparts for <inttypes.h>'s most useful typedefs, possibly because they're quasi-optional. We can easily fix this.

Date User Action Args
2016-06-28 12:47:21adminsetstatus: ready -> wp
2016-03-07 04:46:57adminsetstatus: review -> ready
2015-10-15 18:54:55adminsetstatus: open -> review
2015-10-15 18:54:55adminsetmessages: + msg7564
2015-05-08 04:23:26adminsetmessages: + msg7391
2015-03-22 18:20:19adminsetmessages: + msg7235
2014-11-25 21:46:57adminsetmessages: + msg7205
2014-11-24 15:48:19adminsetstatus: new -> open
2014-11-24 15:48:19adminsetmessages: + msg7201
2014-10-08 19:47:45adminsetmessages: + msg7135
2014-10-01 00:00:00admincreate