[vlc-devel] [PATCH] Added check for _Static_assert and C++11 static_assert.
Rémi Denis-Courmont
remi at remlab.net
Wed Nov 27 10:35:30 CET 2013
On Wed, 27 Nov 2013 01:50:09 +0400, Maxim Bublis <b at codemonkey.ru> wrote:
> Apple's SDK misses static_assert for C standard library but defines it
for
> C++ standard library in the same time.
autoconf is used to add missing bits, not to fix broken toolchain bits.
VLC officially only requires C99 at this point, so there is a check to
emulate static_assert() on pre-C11 compilers. It could be extended to
support C11 compilers (freestanding implementation) with C99 libraries if
this ever became necessary. This is most likely to affect irrelevant (to
VLC) embedded systems though.
However autoconf will hardly deal with inconsistencies in the toolchain,
such as between C and C++. You just have to use compatible C and C++
compilers in a given VLC build. In general, I do not think that a toolchain
bug can (nor should) be fixed with autoconf.
Indeed, your patch does not address all of the five cases: C with
assert.h, C++ with assert.h, C++ with cassert, C++ with assert.h then
cassert and C++ with cassert then assert.h.
--
Rémi Denis-Courmont
Sent from my collocated server
More information about the vlc-devel
mailing list