compiler: give error for non-int arguments to make
authorIan Lance Taylor <ian@gcc.gnu.org>
Mon, 5 Feb 2018 01:46:07 +0000 (01:46 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Mon, 5 Feb 2018 01:46:07 +0000 (01:46 +0000)
commit4cff15eaca92180183608371351ba2c818990304
tree21ff74b0c1fdd336b5e4670a87171eb39befb6c5
parent91cb7f7804da1e4974e1e3589822e10910eeae20
compiler: give error for non-int arguments to make

    This implements a requirement of the language spec.

    While we're here fix the value returned by the type method of a
    builtin call expression to make, although this doesn't seem to make
    any difference anywhere since we lower this to a runtime call before
    the determine_types pass anyhow.

    There is already a test for this error in the master repository:
    test/fixedbugs/issue16949.go. It just hasn't made it into the gccgo
    testsuite yet.

    Fixes golang/go#16949

    Reviewed-on: https://go-review.googlesource.com/91697

From-SVN: r257376
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/expressions.cc