set -std=gnu99 for imath-32 in CFLAGS not CPPFLAGS
commit74dedde94c2a09db230aed7942487b1b1a75b230
authorTobias Grosser <tobias@grosser.es>
Thu, 23 Aug 2018 17:58:05 +0000 (23 19:58 +0200)
committerSven Verdoolaege <sven.verdoolaege@gmail.com>
Thu, 23 Aug 2018 21:04:08 +0000 (23 23:04 +0200)
treed7cd1149262716f86d922ddf16e747bfda3529d5
parentb7459137b65166fa154226bd724bfc1ee15da8bb
set -std=gnu99 for imath-32 in CFLAGS not CPPFLAGS

In isl-0.15-16-g732cd067 (add -std=gnu99 to compile flags when compiling
imath-32 backend with gcc, Sun Jun 21 22:21:59 2015 +0200), -std=gnu99
mode was set for the imath backend to ensure that inline definitions
follow the C99 definition in gcc. However, by accident the language
standard was set in the CPPFLAGS which apply to both C and C++ code.
While at this point isl did not have any C++ code, today isl has C++
code due to the C++ bindings introduced in isl-0.18-598-g81c38ef4 (cpp:
generate C++ wrapper classes,  Sat Apr 8 05:12:50 2017 +0200). When
compiling with imath-32 clang 6.0 reports the error:

"error: invalid argument '-std=gnu99' not allowed with 'C++'"

if C++ files are compiled with a C language standard option. To ensure
that only C files are compiled in C99 mode, set CFLAGS instead of CPPFLAGS.

Signed-off-by: Tobias Grosser <tobias@grosser.es>
Signed-off-by: Sven Verdoolaege <sven.verdoolaege@gmail.com>
Makefile.am
configure.ac