You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
~/code/src/vu (master): go version
go version go1.7.4 windows/amd64
~/code/src/vu (master): go install vu/render/gl
~/code/src/vu (master):
What did you see instead?
The warning seems to incorrectly complain that "argument is of type 'void * const*'".
~/code/src/vu (master): go version
go version go1.8beta1 windows/amd64
~/code/src/vu (master): go install vu/render/gl
# vu/render/gl
cgo-gcc-prolog: In function '_cgo_8d303d926b5a_Cfunc_wrap_glMultiDrawElements':
cgo-gcc-prolog:4926:48: warning: passing argument 4 of 'wrap_glMultiDrawElements' from incompatible pointer type [-Winco mpatible-pointer-types]
render\gl\gl.go:1131:22: note: expected 'const void * const*' but argument is of type 'void * const*'
// GLAPI void APIENTRY wrap_glMultiDrawElements(unsigned int mode, const int* count, unsigned int t_ype, const void* co nst* indices, int drawcount) { (pfn_glMultiDrawElements)((GLenum)mode, (const GLsizei )count, (GLenum)t_ype, (const G Lvoid const )indices, (GLsizei)drawcount); }
^
cgo-gcc-prolog: In function '_cgo_8d303d926b5a_Cfunc_wrap_glMultiDrawElementsBaseVertex':
cgo-gcc-prolog:4946:58: warning: passing argument 4 of 'wrap_glMultiDrawElementsBaseVertex' from incompatible pointer ty pe [-Wincompatible-pointer-types]
render\gl\gl.go:1134:22: note: expected 'const void * const' but argument is of type 'void * const'
// GLAPI void APIENTRY wrap_glMultiDrawElementsBaseVertex(unsigned int mode, const int* count, unsigned int t_ype, cons t void* const* indices, int drawcount, const int* basevertex) { (*pfn_glMultiDrawElementsBaseVertex)((GLenum)mode, (con st GLsizei )count, (GLenum)t_ype, (const GLvoid const *)indices, (GLsizei)drawcount, (const GLint *)basevertex); }
^
The text was updated successfully, but these errors were encountered:
ianlancetaylor
changed the title
Cgo issues warning in 1.8Beta that is not seen in previous versions.
cmd/cgo: warning in 1.8Beta that is not seen in previous versions
Dec 13, 2016
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?What operating system and processor architecture are you using (
go env
)?What did you do?
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
"go install" the following file to recreate the error.
https://github.com/gazed/vu/blob/master/render/gl/gl.go
lines 1131 and 1134 compiled with no warnings in all previous versions of Go.
What did you expect to see?
What did you see instead?
The warning seems to incorrectly complain that "argument is of type 'void * const*'".
~/code/src/vu (master): go version
go version go1.8beta1 windows/amd64
~/code/src/vu (master): go install vu/render/gl
# vu/render/gl
cgo-gcc-prolog: In function '_cgo_8d303d926b5a_Cfunc_wrap_glMultiDrawElements':
cgo-gcc-prolog:4926:48: warning: passing argument 4 of 'wrap_glMultiDrawElements' from incompatible pointer type [-Winco mpatible-pointer-types]
render\gl\gl.go:1131:22: note: expected 'const void * const*' but argument is of type 'void * const*'
// GLAPI void APIENTRY wrap_glMultiDrawElements(unsigned int mode, const int* count, unsigned int t_ype, const void* co nst* indices, int drawcount) { (pfn_glMultiDrawElements)((GLenum)mode, (const GLsizei )count, (GLenum)t_ype, (const G Lvoid const )indices, (GLsizei)drawcount); }
^
cgo-gcc-prolog: In function '_cgo_8d303d926b5a_Cfunc_wrap_glMultiDrawElementsBaseVertex':
cgo-gcc-prolog:4946:58: warning: passing argument 4 of 'wrap_glMultiDrawElementsBaseVertex' from incompatible pointer ty pe [-Wincompatible-pointer-types]
render\gl\gl.go:1134:22: note: expected 'const void * const' but argument is of type 'void * const'
// GLAPI void APIENTRY wrap_glMultiDrawElementsBaseVertex(unsigned int mode, const int* count, unsigned int t_ype, cons t void* const* indices, int drawcount, const int* basevertex) { (*pfn_glMultiDrawElementsBaseVertex)((GLenum)mode, (con st GLsizei )count, (GLenum)t_ype, (const GLvoid const *)indices, (GLsizei)drawcount, (const GLint *)basevertex); }
^
The text was updated successfully, but these errors were encountered: