summaryrefslogtreecommitdiff
path: root/gcc/c-lang.c
diff options
context:
space:
mode:
authorgkm <gkm@138bc75d-0d04-0410-961f-82ee72b054a4>1999-10-16 01:25:01 +0000
committergkm <gkm@138bc75d-0d04-0410-961f-82ee72b054a4>1999-10-16 01:25:01 +0000
commit5e57d7a8002420515f888c8ac1732e9401cd8290 (patch)
tree2409137ecdec41f774cd2f423cc4ae796502a936 /gcc/c-lang.c
parenteeda353fa421790d2db48600043d5a3263e69bda (diff)
downloadgcc-5e57d7a8002420515f888c8ac1732e9401cd8290.tar.gz
* 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". git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30035 138bc75d-0d04-0410-961f-82ee72b054a4
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 c8efa35ff6f..db761878984 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. */