diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-23 18:14:31 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-23 18:14:31 +0000 |
commit | bd08a4e696f9fc58eb5a47250566867849a358e4 (patch) | |
tree | a86518d1f2373ba547d08bd0867d006b5db75f24 /gcc/c-common.h | |
parent | 753a360f09c905c575eb1a106827a2e74c2e6bdc (diff) | |
download | gcc-bd08a4e696f9fc58eb5a47250566867849a358e4.tar.gz |
* c-common.c (warn_div_by_zero): New.
* c-common.h (warn_div_by_zero): New.
* c-decl.c (c_decode_option): Take it on the command line.
* c-typeck.c (build_binary_op): Warn about division by zero.
* doc/invoke.texi: Document the new command line option, fix
documentation of -Wmultichar.
* testsuite/gcc.dg/divbyzero.c: New tests.
* testsuite/gcc.dg/noncompile/20010524-1.c: Update.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46439 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-common.h')
-rw-r--r-- | gcc/c-common.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/c-common.h b/gcc/c-common.h index 89a4ae7252f..0d45693531f 100644 --- a/gcc/c-common.h +++ b/gcc/c-common.h @@ -401,6 +401,9 @@ extern int warn_missing_format_attribute; extern int warn_pointer_arith; +/* Nonzero means to warn about compile-time division by zero. */ +extern int warn_div_by_zero; + /* Nonzero means do some things the same way PCC does. */ extern int flag_traditional; |