diff options
author | Ian Lance Taylor <iant@google.com> | 2012-04-20 19:21:39 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2012-04-20 19:21:39 +0000 |
commit | 63d1e46df06893b073418be4e27f95eebd05ba26 (patch) | |
tree | c10e54920198d7e76b320d82626dc392302ee553 /gcc/go/gofrontend/gogo.h | |
parent | 0e27a180fd0f9270bcfacec0b4940283eaf6eb61 (diff) | |
download | gcc-63d1e46df06893b073418be4e27f95eebd05ba26.zip gcc-63d1e46df06893b073418be4e27f95eebd05ba26.tar.gz gcc-63d1e46df06893b073418be4e27f95eebd05ba26.tar.bz2 |
compiler, runtime: Add explicit checks for zero and overflow division.
* lang.opt: Add -fgo-check-divide-zero and
-fgo-check-divide-overflow.
* gccgo.texi (Invoking gccgo): Document new options.
From-SVN: r186637
Diffstat (limited to 'gcc/go/gofrontend/gogo.h')
-rw-r--r-- | gcc/go/gofrontend/gogo.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/go/gofrontend/gogo.h b/gcc/go/gofrontend/gogo.h index 6c77c3b..9c5f8cb 100644 --- a/gcc/go/gofrontend/gogo.h +++ b/gcc/go/gofrontend/gogo.h @@ -2791,6 +2791,9 @@ static const int RUNTIME_ERROR_MAKE_MAP_OUT_OF_BOUNDS = 8; // Channel capacity out of bounds in make: negative or overflow. static const int RUNTIME_ERROR_MAKE_CHAN_OUT_OF_BOUNDS = 9; +// Division by zero. +static const int RUNTIME_ERROR_DIVISION_BY_ZERO = 10; + // This is used by some of the langhooks. extern Gogo* go_get_gogo(); |