Skip to content

gc does not compile under clang-2.9 #2076

@gopherbot

Description

@gopherbot

by davecheney:

What steps will reproduce the problem?

mercury(~/go/src) % export CC=~/devel/build/Release/bin/clang
mercury(~/go/src) % make -C cmd/6g

What is the expected output?

Successful compilation

What do you see instead?

make: Entering directory `/home/dfc/go/src/cmd/6g'
quietgcc -I"/home/dfc/go/include" -ggdb -O2 -c -I. -o pgen.o ../gc/pgen.c
../gc/pgen.c:192:28: error: comparison of unsigned expression < 0 is always false
[-Werror,-Wtautological-compare]
                if((w >= MAXWIDTH) || (w < 0))
                                       ~ ^ ~
1 error generated.
make: *** [pgen.o] Error 1
make: Leaving directory `/home/dfc/go/src/cmd/6g'

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

6g, but the same is observed under 8g and probably under 5g because they all include
../gc/pgen.c

Which operating system are you using?

ubuntu 11.10

Which revision are you using?  (hg identify)

mercury(~/go/src) % hg identify
ba1bd8be90e2 tip

Please provide any additional information below.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions