Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

alignment with ISO C11

93 views
Skip to first unread message

Szabolcs Nagy

unread,
Aug 27, 2014, 1:30:02 PM8/27/14
to

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...@vandevoorde.com ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]

0 new messages