}
     }
 
+  mpfr_clear_overflow();
   mpfr_t val;
   int r = mpfr_init_set_str(val, num.c_str(), base, MPFR_RNDN);
   go_assert(r == 0);
+  if (mpfr_overflow_p())
+    go_error_at(this->location(),
+               "floating-point exponent too large to represent");
 
   bool is_imaginary = *p == 'i';
   if (is_imaginary)
 
 package main
 
 func main() {
-       const _ int64 = 1e646456992 // ERROR "integer too large|floating-point constant truncated to integer"
-       const _ int32 = 1e64645699  // ERROR "integer too large|floating-point constant truncated to integer"
-       const _ int16 = 1e6464569   // ERROR "integer too large|floating-point constant truncated to integer"
-       const _ int8 = 1e646456     // ERROR "integer too large|floating-point constant truncated to integer"
-       const _ int = 1e64645       // ERROR "integer too large|floating-point constant truncated to integer"
+       const _ int64 = 1e646456992 // ERROR "integer too large|floating-point constant truncated to integer|exponent too large"
+       const _ int32 = 1e64645699  // ERROR "integer too large|floating-point constant truncated to integer|exponent too large"
+       const _ int16 = 1e6464569   // ERROR "integer too large|floating-point constant truncated to integer|exponent too large"
+       const _ int8 = 1e646456     // ERROR "integer too large|floating-point constant truncated to integer|exponent too large"
+       const _ int = 1e64645       // ERROR "integer too large|floating-point constant truncated to integer|exponent too large"
 
-       const _ uint64 = 1e646456992 // ERROR "integer too large|floating-point constant truncated to integer"
-       const _ uint32 = 1e64645699  // ERROR "integer too large|floating-point constant truncated to integer"
-       const _ uint16 = 1e6464569   // ERROR "integer too large|floating-point constant truncated to integer"
-       const _ uint8 = 1e646456     // ERROR "integer too large|floating-point constant truncated to integer"
-       const _ uint = 1e64645       // ERROR "integer too large|floating-point constant truncated to integer"
+       const _ uint64 = 1e646456992 // ERROR "integer too large|floating-point constant truncated to integer|exponent too large"
+       const _ uint32 = 1e64645699  // ERROR "integer too large|floating-point constant truncated to integer|exponent too large"
+       const _ uint16 = 1e6464569   // ERROR "integer too large|floating-point constant truncated to integer|exponent too large"
+       const _ uint8 = 1e646456     // ERROR "integer too large|floating-point constant truncated to integer|exponent too large"
+       const _ uint = 1e64645       // ERROR "integer too large|floating-point constant truncated to integer|exponent too large"
 
-       const _ rune = 1e64645 // ERROR "integer too large|floating-point constant truncated to integer"
+       const _ rune = 1e64645 // ERROR "integer too large|floating-point constant truncated to integer|exponent too large"
 }
 
   grep -v '^type _*locale[_ ]' | \
   grep -v 'in6_addr' | \
   grep -v 'sockaddr_in6' | \
+  egrep -v '^const _*FLT(64|128)_(NORM_)?MAX' | \
   sed -e 's/\([^a-zA-Z0-9_]\)_timeval\([^a-zA-Z0-9_]\)/\1timeval\2/g' \
       -e 's/\([^a-zA-Z0-9_]\)_timespec_t\([^a-zA-Z0-9_]\)/\1timespec\2/g' \
       -e 's/\([^a-zA-Z0-9_]\)_timespec\([^a-zA-Z0-9_]\)/\1timespec\2/g' \
 
   grep -v '^type _*locale[_ ]' | \
   grep -v 'in6_addr' | \
   grep -v 'sockaddr_in6' | \
+  egrep -v '^const _*FLT(64|128)_(NORM_)?MAX' | \
   sed -e 's/\([^a-zA-Z0-9_]\)_timeval\([^a-zA-Z0-9_]\)/\1Timeval\2/g' \
       -e 's/\([^a-zA-Z0-9_]\)_timespec_t\([^a-zA-Z0-9_]\)/\1Timespec\2/g' \
       -e 's/\([^a-zA-Z0-9_]\)_timespec\([^a-zA-Z0-9_]\)/\1Timespec\2/g' \