FAQ
Hello,

The "Function pointer callbacks example" from the cgo wiki page on github
(linked below) is generating a compiler warning when I try to build it. It
can be worked around by adding `no-implicit-function-declaration", but
should be reported as bug if it works with other versions without
generating a warning?

-Tony

-----
OS: Ubuntu 15.10
go version go1.5.2 linux/amd64
gcc (Ubuntu 5.2.1-22ubuntu2) 5.2.1 20151010

This does not appear to happen with older versions of gcc.

Steps to reproduce: Follow
https://github.com/golang/go/wiki/cgo#function-pointer-callbacks.

Expected result: No compiler warnings from the `go build` command.

Actual result:
    ./cfuncs.go: In function ‘callOnMeGo_cgo’:
    ./cfuncs.go:11:12: warning: implicit declaration of function
‘callOnMeGo’ [-Wimplicit-function-declaration]
        return callOnMeGo(in);



--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Andrew Gerrand at Jan 13, 2016 at 9:42 pm

    On 14 January 2016 at 07:09, wrote:

    other versions

    Other versions of what?

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Awsaba at Jan 13, 2016 at 9:48 pm

    On Wednesday, January 13, 2016 at 2:42:37 PM UTC-7, Andrew Gerrand wrote:
    On 14 January 2016 at 07:09, <aws...@gmail.com <javascript:>> wrote:

    other versions

    Other versions of what?
    Other (older?) versions of gcc. No warnings are generated with gcc 4.8.4.

    The warnings are generated with go 1.6beta with gcc 5.2.1.

    -Tony

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedJan 13, '16 at 8:25p
activeJan 13, '16 at 9:48p
posts3
users2
websitegolang.org

2 users in discussion

Awsaba: 2 posts Andrew Gerrand: 1 post

People

Translate

site design / logo © 2021 Grokbase