tarantool / small

Specialized memory allocators
Other
102 stars 22 forks source link

Support compilation with C89 #25

Open Totktonada opened 4 years ago

Totktonada commented 4 years ago

As far as I got this change, the idea was to use parent's project CFLAGS when libsmall is built as part of another project (and so when CMake variable SMALL_EMBEDDED is set). So we should be quite tolerable to different options and C dialects.

GCC 4.8 comforms to C89 by default (with GNU extensions, as if -std=gnu90 would be passed). GCC 4.8 is the default compiler on Ubuntu Trusty that is the previous default OS on Travis CI (until it was changed to Xenial).

All those facts comes into one fail when we tried to update libsmall in tarantool/memcached module.

Please, ensure that C89 support will not break again with a CI rule.

Thanks @LeonidVas for the initial investigation.

LeonidVas commented 4 years ago

Maybe it's time is come to say that c89 is deprecated?

LeonidVas commented 4 years ago

I think that if we still want to use c89, then this should be added to the "small" ci.

tsafin commented 4 years ago

I'd rather burn Trusty and we would move forward.

FWIW, Yandex.Taxi used Trusty on most of their datacenter host till circa year ago, and then gradually upgraded everything to Xenial. Trusty is unsupported target for half a year already.

Totktonada commented 4 years ago

Maybe it's time is come to say that c89 is deprecated?

Okay, but then we should get rid (fully or partially) from the idea to be built with parent's flags. At least from using parent's C dialect. It is the change of the expected behaviour (that was never documented though).