Warning when linking with C++ code
When linking with a C++ file, GHC 8.2.1.20170928 produces a warning because it runs gcc with 'std=gnu99', even when I pass 'std=c++11' to cc-options (when using stack with -v3
, I see that the command is something like gcc std=gnu99 ... std=c++11
, so it isn't *ignoring* my input, just appending it.) I believe this warning is new as of 8.2.
The attached example demonstrates the problem:
> cabal configure
> cabal build
cc1plus: warning: command line option ‘-std=gnu99’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-std=gnu99’ is valid for C/ObjC but not for C++