[GHC] #14345: Warning when linking with C++ code
GHC
ghc-devs at haskell.org
Thu Oct 12 05:40:54 UTC 2017
#14345: Warning when linking with C++ code
-------------------------------------+-------------------------------------
Reporter: crockeea | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.2.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect | Unknown/Multiple
error/warning at compile-time | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Description changed by crockeea:
Old description:
> 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, 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++
> }}}
New description:
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++
}}}
--
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14345#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list