4 ms·
Maybe. For example, GCC 5 changed the default for C from gnu89 to gnu11 and that broke the build of some Finnish amateur project: https://lkml.org/lkml/2014/10
by cremno 11y ago
Maybe. For example, GCC 5 changed the default for C from gnu89 to gnu11 and that broke the build of some Finnish amateur project:
https://lkml.org/lkml/2014/10/19/94 https://lkml.org/lkml/2014/10/19/94
That's why projects that use GCC or a compatible compiler should use the -std option to set the targeted standard and not rely on the default.
- ajross 11y agoPretty much. Taking the "will this break stuff?" worry to the logical extreme would mean that gcc should default to a pre-standarization K&R dialect and g++ to a cfront dialect contemporary with 1st edition Stroustrup. The world moves on. Though if you're an active project, moving along with the world is probably a better option than throwing in --std=c++really-old and deliberately refusing to use new stuff.
- rbanffy 11y agoForcing the update of old code doesn't make me sad. Considering new versions of the language should be improvements over previous ones, it may be a good side effect. If your code breaks with the new compiler and language standard, just change your build options to explicitly use the previous one.