r257379 - in /trunk/gcc/go/gofrontend: MERGE ex...

ian@gcc.gnu.org ian@gcc.gnu.org
Mon Feb 5 01:57:00 GMT 2018


Author: ian
Date: Mon Feb  5 01:57:42 2018
New Revision: 257379

URL: https://gcc.gnu.org/viewcvs?rev=257379&root=gcc&view=rev
Log:
    compiler: update iota handling, fix using iota in array length
    
    CL 71750 changed the definition of how iota works.  This patch updates
    gccgo for the new definition.
    
    We've been mishandling iota appearing in a type that appears in a
    const expression, as in `c = len([iota]int{})`.  Correct that by copying
    type expressions when we copy an expression.  For simplicity only copy
    when it can change the size of a type, as that is the only case where
    iota in a type can affect the value of a constant (I think).  This is
    still a bunch of changes, but almost all boilerplate.
    
    Fixes golang/go#22341
    
    Reviewed-on: https://go-review.googlesource.com/91475

Modified:
    trunk/gcc/go/gofrontend/MERGE
    trunk/gcc/go/gofrontend/expressions.cc
    trunk/gcc/go/gofrontend/expressions.h
    trunk/gcc/go/gofrontend/parse.cc
    trunk/gcc/go/gofrontend/parse.h
    trunk/gcc/go/gofrontend/types.cc
    trunk/gcc/go/gofrontend/types.h



More information about the Gcc-cvs mailing list