small icon indicating copy to clipboard operation
small copied to clipboard

Support compilation with C89

Open Totktonada opened this issue 4 years ago • 4 comments

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.

Totktonada avatar Jun 02 '20 22:06 Totktonada

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

LeonidVas avatar Jun 03 '20 07:06 LeonidVas

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

LeonidVas avatar Jun 03 '20 07:06 LeonidVas

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.

tsafin avatar Jun 03 '20 07:06 tsafin

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).

Totktonada avatar Jun 03 '20 10:06 Totktonada