I think that
static_assert((CHAR_BIT & (CHAR_BIT - 1)) == 0
can be pretty safely replaced byCHAR_BIT==8
. There are various old DSP compilers that would fail the test, but they are indeed dinosaur systems.stdint.h and constants like
SIZE_MAX
,PTRDIFF_MAX
were added in C99. So by using such macros/constants, you'll essentially cause all C90 compilers to fail compilation.Are C90 compilers dinosaurs per your definition? If not, then maybe do some checks if
__STDC_VERSION__
is defined and if so what version. Because most of the exotic ones are likely to follow C90.
Are C90 compilers dinosaurs per your definition? If not, then maybe
do some checks if __STDC_VERSION__
is defined and if so what
version. Because most of the exotic ones are likely to follow C90.
I think that
static_assert((CHAR_BIT & (CHAR_BIT - 1)) == 0
can be pretty safely replaced byCHAR_BIT==8
. There are various old DSP compilers that would fail the test, but they are indeed dinosaur systems.stdint.h and constants like
SIZE_MAX
,PTRDIFF_MAX
were added in C99. So by using such macros/constants, you'll essentially cause all C90 compilers to fail compilation.
Are C90 compilers dinosaurs per your definition? If not, then maybe
do some checks if __STDC_VERSION__
is defined and if so what
version. Because most of the exotic ones are likely to follow C90.
I think that
static_assert((CHAR_BIT & (CHAR_BIT - 1)) == 0
can be pretty safely replaced byCHAR_BIT==8
. There are various old DSP compilers that would fail the test, but they are indeed dinosaur systems.stdint.h and constants like
SIZE_MAX
,PTRDIFF_MAX
were added in C99. So by using such macros/constants, you'll essentially cause all C90 compilers to fail compilation.Are C90 compilers dinosaurs per your definition? If not, then maybe do some checks if
__STDC_VERSION__
is defined and if so what version. Because most of the exotic ones are likely to follow C90.
I think that
static_assert((CHAR_BIT & (CHAR_BIT - 1)) == 0
can be pretty safely replaced byCHAR_BIT==8
. There are various old DSP compilers that would fail the test, but they are indeed dinosaur systems.stdint.h and constants like
SIZE_MAX
,PTRDIFF_MAX
were added in C99. So by using such macros/constants, you'll essentially cause all C90 compilers to fail compilation.
Are C90 compilers dinosaurs per your definition? If not, then maybe
do some checks if __STDC_VERSION__
is defined and if so what
version. Because most of the exotic ones are likely to follow C90.