aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-lang.c
diff options
context:
space:
mode:
authorGreg McGary <gkm@gnu.org>1999-10-16 01:25:01 +0000
committerGreg McGary <gkm@gcc.gnu.org>1999-10-16 01:25:01 +0000
commita8aa79754dcc89603567741aac26db144a430700 (patch)
tree2409137ecdec41f774cd2f423cc4ae796502a936 /gcc/c-lang.c
parenta9d3cc3f1a1da3d0e5044249891594933e37ab20 (diff)
downloadgcc-a8aa79754dcc89603567741aac26db144a430700.zip
gcc-a8aa79754dcc89603567741aac26db144a430700.tar.gz
gcc-a8aa79754dcc89603567741aac26db144a430700.tar.bz2
flags.h (flag_bounds_check, [...]): New extern decls.
* flags.h (flag_bounds_check, flag_bounded_pointers): New extern decls. * toplev.c (flag_bounds_check, flag_bounded_pointers): New flags. (f_options): Add "bounded-pointers" and "bounds-check" entries. * c-lang.c (lang_init_options): Set flag_bounds_check as "unspecified". (lang_init): Set default for flag_bounds_check if still "unspecified". From-SVN: r30035
Diffstat (limited to 'gcc/c-lang.c')
-rw-r--r--gcc/c-lang.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/c-lang.c b/gcc/c-lang.c
index c8efa35..db76187 100644
--- a/gcc/c-lang.c
+++ b/gcc/c-lang.c
@@ -1,5 +1,5 @@
/* Language-specific hook definitions for C front end.
- Copyright (C) 1991, 1995, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1995, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -28,6 +28,7 @@ Boston, MA 02111-1307, USA. */
#include "c-lex.h"
#include "toplev.h"
#include "output.h"
+#include "flags.h"
#include "ggc.h"
#if USE_CPPLIB
@@ -56,11 +57,17 @@ lang_init_options ()
parse_in.opts = &parse_options;
cpp_options_init (&parse_options);
#endif
+ /* Mark as "unspecified". */
+ flag_bounds_check = -1;
}
void
lang_init ()
{
+ /* If still "unspecified", make it match -fbounded-pointers. */
+ if (flag_bounds_check < 0)
+ flag_bounds_check = flag_bounded_pointers;
+
/* the beginning of the file is a new line; check for # */
/* With luck, we discover the real source file's name from that
and put it in input_filename. */