[GHC] #14345: Warning when linking with C++ code

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[GHC] #14345: Warning when linking with C++ code

GHC - devs mailing list
#14345: Warning when linking with C++ code
-------------------------------------+-------------------------------------
           Reporter:  crockeea       |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.2.1
           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:
-------------------------------------+-------------------------------------
 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++
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14345>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
ghc-tickets mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-tickets
Reply | Threaded
Open this post in threaded view
|

Re: [GHC] #14345: Warning when linking with C++ code

GHC - devs mailing list
#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:                    |
-------------------------------------+-------------------------------------
Changes (by crockeea):

 * Attachment "bug.tar.gz" added.

 Minimal example

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14345>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
ghc-tickets mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-tickets
Reply | Threaded
Open this post in threaded view
|

Re: [GHC] #14345: Warning when linking with C++ code

GHC - devs mailing list
In reply to this post by GHC - devs mailing list
#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

_______________________________________________
ghc-tickets mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-tickets