<pre class="notranslate">In this small example below, both snippets used to compile. Recently, 
however, only the 2nd snippet compiles:

<a href="http://pastie.org/743667" rel="nofollow">http://pastie.org/743667</a>

What is the expected output? What do you see instead?
I expect both to compile. 

What is your $GOOS?  $GOARCH?
linux/386

Which revision are you using?  (hg identify)
a33ae1785d42+ (+=�=&lt;) tip

Please provide any additional information below.
Something must have changed recently</pre>
<p dir="auto">by <strong>kballard</strong>:</p>
<pre class="notranslate">Building launchpad.net/goyaml produces a series of warnings:

decode.go: In function ‘_cgo_27a928056cbd_Cfunc_event_alias’:
decode.go:34:7: warning: assignment from incompatible pointer type [enabled by default]
decode.go: In function ‘_cgo_27a928056cbd_Cfunc_event_mapping_start’:
decode.go:44:7: warning: assignment from incompatible pointer type [enabled by default]
decode.go: In function ‘_cgo_27a928056cbd_Cfunc_event_scalar’:
decode.go:54:7: warning: assignment from incompatible pointer type [enabled by default]
decode.go: In function ‘_cgo_27a928056cbd_Cfunc_event_sequence_start’:
decode.go:64:7: warning: assignment from incompatible pointer type [enabled by default]

The Cgo-generated function for the first warning looks like

void
_cgo_27a928056cbd_Cfunc_event_mapping_start(void *v)
{
    struct {
        yaml_event_t* p0;
        const struct {yaml_char_t* anchor; yaml_char_t* tag; int implicit; yaml_mapping_style_t style; }* r;
    } __attribute__((__packed__)) *a = v;
    a-&gt;r = (const struct {yaml_char_t* anchor; yaml_char_t* tag; int implicit; yaml_mapping_style_t style; }*) event_mapping_start((void*)a-&gt;p0);
}

The warning is on the `a-&gt;r = ...` line.

If I ask Clang to build this file, the warning is a bit more verbose:

decode.go:34:7: warning: incompatible pointer types assigning to 'const struct
&lt;anonymous struct at decode.go:32:9&gt; *' from 'const struct &lt;anonymous struct at
      decode.go:34:16&gt; *' [-Wincompatible-pointer-types]
        a-&gt;r = (const struct {yaml_char_t* anchor; }*) event_alias((void*)a-&gt;p0);
             ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


What steps will reproduce the problem?
1. Build launchpad.net/goyaml

What is the expected output?
No warnings

What do you see instead?
The warnings listed above

Which compiler are you using (5g, 6g, 8g, gccgo)?
8g

Which operating system are you using?
Ubuntu 12.04

Which version are you using?  (run 'go version')
go version go1.1 linux/386</pre>