diff options
author | Neil Booth <neil@daikokuya.co.uk> | 2003-06-30 19:36:25 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2003-06-30 19:36:25 +0000 |
commit | 37fa72e9d359a0c00c3b62e9aabd74276daa6602 (patch) | |
tree | 01d40120cc52c2574f790a44609bf19f0551b019 /gcc/cp | |
parent | 4497827651d07fa10006fbac4cf63a92cf83c2a2 (diff) | |
download | gcc-37fa72e9d359a0c00c3b62e9aabd74276daa6602.zip gcc-37fa72e9d359a0c00c3b62e9aabd74276daa6602.tar.gz gcc-37fa72e9d359a0c00c3b62e9aabd74276daa6602.tar.bz2 |
c-common.c (enum c_language_kind, flag_objc): Remove.
* c-common.c (enum c_language_kind, flag_objc): Remove.
(fix_string_type, check_case_value, c_common_nodes_and_builtins,
c_add_case_label, finish_label_addr_expr, boolean_increment):
Use c_dialect_ macros.
* c-common.h (enum c_language_kind): Extend.
(c_dialect_cxx, c_dialect_objc): New.
(flag_objc): Remove.
(c_common_init_options): Update prototype.
* c-cppbuiltin.c (define__GNUC__, c_cpp_builtins): Use c_dialect_
macros.
* c-decl.c (finsih_decl, grokfield, finish_struct): Use c_dialect_
macros.
* c-format.c (C_STD_VER, C_STD_NAME): Similarly.
* c-lang.c (c_init_options): Remove.
(c_language): Define.
(LANG_HOOKS_INIT_OPTIONS): Use common hook.
* c-lex.c (lex_charconst): Use c_dialect_cxx().
* c-opts.c (lang_flags): Make function-local.
(c_common_init_options): Use c_dialect_ macros. Handle
C++ diagnostic requirements.
(c_common_handle_option, c_common_post_options): Use flag_cxx.
* c-parse.in (init_reswords): Use c_dialect_objc ().
* c-pch.c (get_ident): Use c_language.
* c-pretty-print.c (pp_c_bool_literal): Use c_dialect_ macros.
* c-typeck.c (comptypes, build_c_cast): Similarly.
* objc/objc-lang.c (c_language): Define.
(LANG_HOOKS_INIT_OPTIONS): Use common hook.
(objc_init_options): Remove.
cp:
* Make-lang.in: Update.
* cp-lang.c (c_language): Define.
(LANG_HOOKS_INIT_OPTIONS): Use common hook.
* cp-tree.h (cxx_init_options): Remove.
* lex.c: Don't include diagnostic.h.
(cxx_init_options): Remove.
From-SVN: r68734
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/cp/Make-lang.in | 3 | ||||
-rw-r--r-- | gcc/cp/cp-lang.c | 4 | ||||
-rw-r--r-- | gcc/cp/cp-tree.h | 1 | ||||
-rw-r--r-- | gcc/cp/lex.c | 17 |
5 files changed, 13 insertions, 21 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 9289d67..040582d 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,12 @@ +2003-06-30 Neil Booth <neil@daikokuya.co.uk> + + * Make-lang.in: Update. + * cp-lang.c (c_language): Define. + (LANG_HOOKS_INIT_OPTIONS): Use common hook. + * cp-tree.h (cxx_init_options): Remove. + * lex.c: Don't include diagnostic.h. + (cxx_init_options): Remove. + 2003-06-30 Giovanni Bajo <giovannibajo@libero.it> PR c++/4933 diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in index e340987..2ca56346 100644 --- a/gcc/cp/Make-lang.in +++ b/gcc/cp/Make-lang.in @@ -232,8 +232,7 @@ CXX_TREE_H = $(TREE_H) cp/name-lookup.h cp/cp-tree.h c-common.h \ $(srcdir)/../include/hashtab.h $(srcdir)/../include/splay-tree.h cp/lex.o: cp/lex.c $(CXX_TREE_H) $(TM_H) flags.h cp/lex.h \ - c-pragma.h toplev.h output.h input.h diagnostic.h \ - cp/operators.def $(TM_P_H) + c-pragma.h toplev.h output.h input.h cp/operators.def $(TM_P_H) cp/cp-lang.o: cp/cp-lang.c $(CXX_TREE_H) $(TM_H) toplev.h langhooks.h \ $(LANGHOOKS_DEF_H) c-common.h cp/decl.o: cp/decl.c $(CXX_TREE_H) $(TM_H) flags.h cp/lex.h cp/decl.h stack.h \ diff --git a/gcc/cp/cp-lang.c b/gcc/cp/cp-lang.c index c799437..f26317b 100644 --- a/gcc/cp/cp-lang.c +++ b/gcc/cp/cp-lang.c @@ -30,6 +30,8 @@ Boston, MA 02111-1307, USA. */ #include "langhooks.h" #include "langhooks-def.h" +enum c_language_kind c_language = clk_cxx; + static HOST_WIDE_INT cxx_get_alias_set (tree); static bool ok_to_generate_alias_set_for_type (tree); static bool cxx_warn_unused_global_decl (tree); @@ -48,7 +50,7 @@ static bool cp_var_mod_type_p (tree); #undef LANG_HOOKS_CLEAR_BINDING_STACK #define LANG_HOOKS_CLEAR_BINDING_STACK pop_everything #undef LANG_HOOKS_INIT_OPTIONS -#define LANG_HOOKS_INIT_OPTIONS cxx_init_options +#define LANG_HOOKS_INIT_OPTIONS c_common_init_options #undef LANG_HOOKS_HANDLE_OPTION #define LANG_HOOKS_HANDLE_OPTION c_common_handle_option #undef LANG_HOOKS_POST_OPTIONS diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index d98e92c..cb0bdfc 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -3905,7 +3905,6 @@ extern void yyhook (int); extern int cp_type_qual_from_rid (tree); extern bool cxx_init (void); extern void cxx_finish (void); -extern int cxx_init_options (void); /* in method.c */ extern void init_method (void); diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index b378dc1..a3f2878 100644 --- a/gcc/cp/lex.c +++ b/gcc/cp/lex.c @@ -38,7 +38,6 @@ Boston, MA 02111-1307, USA. */ #include "output.h" #include "tm_p.h" #include "timevar.h" -#include "diagnostic.h" static int interface_strcmp (const char *); static void init_cp_pragma (void); @@ -147,22 +146,6 @@ int interface_unknown; /* whether or not we know this class to behave according to #pragma interface. */ -/* Initialization before switch parsing. */ -int -cxx_init_options (void) -{ - /* Default exceptions on. */ - flag_exceptions = 1; - /* By default wrap lines at 80 characters. Is getenv ("COLUMNS") - preferable? */ - diagnostic_line_cutoff (global_dc) = 80; - /* By default, emit location information once for every - diagnostic message. */ - diagnostic_prefixing_rule (global_dc) = DIAGNOSTICS_SHOW_PREFIX_ONCE; - - return c_common_init_options (clk_cplusplus); -} - void cxx_finish (void) { |