Mal Curtis
Mal Curtis

Reputation: 695

"dereferencing type-punned pointer" error when compiling Go 1.4.2

I'm compiling Go from source on Windows with MinGW. When running make.bat, I get the following error:

# Building C bootstrap tool.
cmd/dist
cmd/dist/windows.c: In function `errstr`:
cmd/dist/windows.c:119: warning: deferencing type-punned pointer will break strict-aliasing rules

I'm not very experienced with compiling on Windows, and it appears like this issue isn't very common, as Google doesn't return anything for it specific to Go.

Edit 1: Admittedly this is a warning, not an error. However a check in the code if errorlevel 1 goto fail appears to consider this output an error, and stops the progress of the script.

Upvotes: 1

Views: 64

Answers (1)

peterSO
peterSO

Reputation: 166529

Go for Windows uses TDM-GCC, a compiler suite for 32- and 64-bit Windows based on the GNU toolchain.

For example,

C:\>gcc --version
gcc (tdm64-1) 4.9.2

Upvotes: 1

Related Questions