diff --git a/doc/go1.18.html b/doc/go1.18.html index 5f94aa86c4..4175063edd 100644 --- a/doc/go1.18.html +++ b/doc/go1.18.html @@ -43,6 +43,19 @@ Do not send CLs removing the interior tags from such phrases. programs is likely very small.

+

+ The Go 1.18 compiler now reports an overflow when passing a rune constant expression + such as '1' << 32 as an argument to the predeclared functions + print and println, consistent with the behavior of + user-defined functions. Before Go 1.18, the compiler did not report an error + in such cases but silently accepted such constant arguments if they fit into an + int64. As a result of this change, (possibly incorrect) programs + may not compile anymore. The necessary fix is straightforward: fix the program if it + was in fact incorrect, or explicitly convert the offending argument to the correct type. + Since go vet always pointed out this error, the number of affected + programs is likely very small. +

+

Generics