tenox7 / ttyplot

a realtime plotting utility for terminal/console with data input from stdin
Apache License 2.0
956 stars 42 forks source link

CI: Compile with `-std=c99` instead of `-std=gnu99` #161

Closed hartwork closed 5 months ago

hartwork commented 5 months ago

It could make sense to put -std=c99 in the Makefile rather than in the CI environment only.

@edgar-bonet I'm unsure how these two approaches compare in effect. I can follow your suggestions if it is a suggestion. What difference in effect do you expect?

edgar-bonet commented 5 months ago

If the user has a compiler that supports C99 but defaults to C90, then adding -std=c99 would be required. Having the option in the Makefile means the build would work out of the box, without the user having to figure out what environment variables have to be passed to make.

Maybe this is a bit far-fetched. GCC 4 defaulted to “gnu90” and GCC 5 to “gnu11”. The last release of GCC 4 was on Aug 2016, while the first release of GCC 5 was on April 2015. Maybe nobody is using GCC 4 anymore? I honestly don't know. I also don't know whether non-GNU compilers (like those in commercial Unixes) support “-std=”.

hartwork commented 5 months ago

@edgar-bonet thanks for elaborating, I'm in the same "don't know for sure place". Should we merge as is and only move to the Makefile when the first issue comes in?

edgar-bonet commented 5 months ago

Should we merge as is and only move to the Makefile when the first issue comes in?

OK, makes sense to me.