[CLN-list] cln 1.3.5
Henrik Grimler
henrik at grimler.se
Thu Nov 28 09:16:52 CET 2019
Hi,
When I try to cross-compile 1.3.5 for android, with clang 8.0.7 (same
with clang 9.0.0), it generates an intparam.h with:
#error "Integers of type int have no binary representation!!"
#error "Integers of type long have no binary representation!!"
#error "Integers of type long long have no binary
representation!!"[...]
#error "Integer types int and unsigned int have different sizes!!"
#error "Integer types long and unsigned long have different sizes!!"
#error "Integer types long long and unsigned long long have different
sizes!!"
#error "Type char * does not fit into an intptr_t!!"
I do not get the same errors with 1.3.4. It seems to due to the
typedef int[<negative>] -> static_assert
change done in 2f7994014542920ad6ca726fbd8d023a5f49abc2. Reverting that
commit makes the build succeed again.
If I compile the old type of test, everything works fine, so
int main()
{
typedef int verify[2*((int)((int)2 * (int)2 * (int)2 * (int)2 *
(int)2 * (int)2 * (int)2 * (int)2 * (int)2 * (int)2 * (int)2 * (int)2 *
(int)2 * (int)2 * (int)2 * (int)2 * (int)2 * (int)2 * (int)2 * (int)2 *
(int)2 * (int)2 * (int)2 * (int)2 * (int)2 * (int)2 * (int)2 * (int)2 *
(int)2 * (int)2 * (int)2 * (int)2) == 0) - 1];
;
return 0;
}
compiles without errors, while the same test with static_assert
int main()
{
static_assert((int)((int)2 * (int)2 * (int)2 * (int)2 * (int)2 *
(int)2 * (int)2 * (int)2 * (int)2 * (int)2 * (int)2 * (int)2 * (int)2 *
(int)2 * (int)2 * (int)2 * (int)2 * (int)2 * (int)2 * (int)2 * (int)2 *
(int)2 * (int)2 * (int)2 * (int)2 * (int)2 * (int)2 * (int)2 * (int)2 *
(int)2 * (int)2 * (int)2) == 0, "");
;
return 0;
}
fails with "test_new.cpp:3:17: error: static_assert expression is not
an integral constant expression"
I unfortunately do not know what the proper fix would be, but reverting
2f7994014542920ad6ca726fbd8d023a5f49abc2 makes the build succeed again
at least.
Best regards,
Henrik Grimler
More information about the CLN-list
mailing list