Mentions légales du service

Skip to content

Source Language is C99, not C90 (missing -std=c99).

Imported issue: Initially reported by Georg-Johann Lay in https://gforge.inria.fr/tracker/?group_id=135&aid=21835


Hi, it just so happens that I am using GCC v4.9 which uses C89 / GNU-C89 as C language default, as opposed to more recent releases v5+ that switched to GNU-C11.

This gives some build warnings when building with older compiler versions, in particular it complains about

  • long long

  • C99 / C++ line comments //

I could fix it by adding CFLAGS='-std=c99 -pedantic' to configure and it builds fine with these options. Maybe one could teach configure to add -std=c99. It does not harm newer compiler versions, of course.

However, setting CFLAGS will override the already CFLAGS like -W -Wall -Wundef -O2 -pedantic...

I am not proficient in autotools, but AM_CFLAGS, AM_CPPFLAGS etc. appears to be the way to go to pass flags from configure.ac, which currently sets CFLAGS directly. See

https://www.gnu.org/software/automake/manual/html_node/Program-Variables.html

Thanks for that piece of software, I am appreciating it.

Johann