Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.std.c++ > #726

alignment with ISO C11

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!border3.nntp.dca.giganews.com!backlog3.nntp.dca3.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date Wed, 27 Aug 2014 12:30:01 -0500
Return-Path <cppmods@glengoyne.dreamhost.com>
Sender std-cpp-request@vandevoorde.com
Approved james.dennett@gmail.com
Message-ID <lti9hl$lu5$1@speranza.aioe.org> (permalink)
Newsgroups comp.std.c++
From Szabolcs Nagy <nsz@port70.net>
Subject alignment with ISO C11
Organization Aioe.org NNTP Server
X-Original-Date Tue, 26 Aug 2014 15:36:23 +0000 (UTC)
X-Submission-Address std-cpp-submit@vandevoorde.com
To undisclosed-recipients:;
Date Wed, 27 Aug 2014 12:27:46 CST
Lines 35
X-Usenet-Provider http://www.giganews.com
X-Trace sv3-FLYOOu0IXBu26K19OiA5YdsDLvGGdBukEs7VG4lz4aHbz8TTwUIrxE197PZHi38+Ohtyu9Reb8KJPmy!559bdrMZOGUPra72f31nlMgjHq6wkoGeaxj7usmXWzBQBGGRpym2IR09
X-Complaints-To abuse@giganews.com
X-DMCA-Notifications http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info Otherwise we will be unable to process your complaint properly
X-Postfilter 1.3.40
X-Original-Bytes 2430
Xref csiph.com comp.std.c++:726

Show key headers only | View raw


it seems that C++14 only references C99 (C++14 1.2p1)

(more precisely "ISO/IEC 9899:1999, Programming languages - C"
with TC1, TC2 and TC3)

but C11 is already out for a few years now with some additions
relevant to C++

18.10p7 already talks about stdalign.h (and cstdalign) eventhough
this is not a C99 header and the requirement is wrong:
only alignas is mentioned, not alignof, which has the same
problem

assert.h now has static_assert in C11 so 19.3 should be updated

thread_local and noreturn are keywords in C++ but macros in C11
in threads.h and stdnoreturn.h (these may or may not need to be
aligned with C++)

uchar.h has similar issues (char16_t and char32_t are keywords)

so it's now unclear how C11 implementations should handle these
headers (assert.h, stdalign.h, stdnoreturn.h, threads.h, uchar.h)
so that C++14 implementations can use the C headers.

ie. where should '#ifndef __cplusplus' be placed in the C headers


--
[ comp.std.c++ is moderated.  To submit articles, try posting with your ]
[ newsreader.  If that fails, use mailto:std-cpp-submit@vandevoorde.com ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]

Back to comp.std.c++ | Previous | Next | Find similar


Thread

alignment with ISO C11 Szabolcs Nagy <nsz@port70.net> - 2014-08-27 12:27 -0600

csiph-web