• Robert Griesemer's avatar
    go spec: constant divisors must not be zero · ddddd39f
    Robert Griesemer authored
    Both gc and gccgo always checked this for constant
    expressions but the spec only mentions run-time
    exceptions.
    
    This CL also requires that constant divisors
    must not be zero in non-constant integer expressions:
    This is consistent with the spirit of the most
    recent changes and it is consistent with constant
    expressions. We don't want to specify the effect for
    non-integer expressions (f/0.0 where f is a float or
    complex number) because there the result f/g is not
    further specified if a non-constant g is 0.
    
    R=r, rsc, iant, ken, andybalholm, iant
    CC=golang-dev
    https://golang.org/cl/6710045
    ddddd39f
go_spec.html 168 KB