summaryrefslogtreecommitdiff
path: root/gcc/f
diff options
context:
space:
mode:
authorneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2003-06-14 12:26:36 +0000
committerneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2003-06-14 12:26:36 +0000
commit3272db82faf87eb82c5b56586dffb5b4b675501d (patch)
treec305de4bdbbe6e6f7807a99ebcbbb965f0549ad6 /gcc/f
parentd493b8a1d36cc7a1dd0a3541c0b2b5779efd4404 (diff)
downloadgcc-3272db82faf87eb82c5b56586dffb5b4b675501d.tar.gz
* Makefile.in: Update to use common.opt and lang_opt_files.
(c-options.c, c-options.h): Remove. (options.c, options.h): Add. * c-opts.c: Include options.h not c-options.h. * common.opt: New file. * configure, configure.in: Add lang_opt_files. * opts.c: Include flags.h and diagnostic.h. (common_handle_option): New. (handle_option): Update to recognize common options and all language-dependent options. * opts.h (CL_F77, CL_JAVA, CL_ADA, CL_COMMON, CL_TREELANG): New. (struct cl_option): Make flags of type int. * opts.h: Flag option with front ends to which it applies. Handle duplicate options. * toplev.c (filename): Remove. (independent_decode_option): Don't handle filenames and -quiet. (process_options, do_compile): Update. ada: * Make-lang.in: Update to use options.c and options.h. * misc.c: Include options.h not aoptions.h. (gnat_handle_option): Abort on unrecognized switch. (gnat_init_options): Request Ada switches. cp: * Make-lang.in: Remove c-options.o. f: * Make-lang.in: Update to use options.c and options.h. * top.c: Include options.h not f-options.h. (gnat_handle_option): Abort on unrecognized switch. (ffe_init_options): From com.c. Request F77 options. (ffe_handle_options): Abort on unrecognized switch. * com.c (ffe_init_options): Move to top.c. * top.h (fee_init_options): New. java: * Make-lang.in: Update to use options.c and options.h. * lang.c: Include options.h not j-options.h. (java_handle_option): Abort on unrecognized option. (java_init_options): Request Java switches. treelang: * Make-lang.in: Update to use options.c and options.h. * tree1.c: Include options.h not t-options.h. (treelang_init_options): New. (treelang_handle_option): Abort on unrecognized switch. * treetree.c (LANG_HOOKS_INIT_OPTIONS): Override. * treetree.h (treelang_init_options): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67941 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/f')
-rw-r--r--gcc/f/ChangeLog9
-rw-r--r--gcc/f/Make-lang.in11
-rw-r--r--gcc/f/com.c15
-rw-r--r--gcc/f/top.c19
-rw-r--r--gcc/f/top.h1
5 files changed, 29 insertions, 26 deletions
diff --git a/gcc/f/ChangeLog b/gcc/f/ChangeLog
index 76717e667af..e6667f4695e 100644
--- a/gcc/f/ChangeLog
+++ b/gcc/f/ChangeLog
@@ -1,3 +1,12 @@
+Sat Jun 14 13:25:00 2003 Neil Booth <neil@daikokuya.co.uk>
+
+ * Make-lang.in: Update to use options.c and options.h.
+ * top.c: Include options.h not f-options.h.
+ (ffe_init_options): From com.c. Request F77 options.
+ (ffe_handle_options): Abort on unrecognized switch.
+ * com.c (ffe_init_options): Move to top.c.
+ * top.h (fee_init_options): New.
+
2003-06-13 Richard Henderson <rth@redhat.com>
PR debug/9864
diff --git a/gcc/f/Make-lang.in b/gcc/f/Make-lang.in
index 0fe264bd26b..c243317e7ae 100644
--- a/gcc/f/Make-lang.in
+++ b/gcc/f/Make-lang.in
@@ -88,7 +88,7 @@ g77-cross$(exeext): g77$(exeext)
F77_OBJS = f/bad.o f/bit.o f/bld.o f/com.o f/data.o f/equiv.o f/expr.o \
f/global.o f/implic.o f/info.o f/intrin.o f/lab.o f/lex.o f/malloc.o \
- f/name.o f/f-options.o f/parse.o f/src.o f/st.o f/sta.o f/stb.o f/stc.o \
+ f/name.o f/parse.o f/src.o f/st.o f/sta.o f/stb.o f/stc.o \
f/std.o f/ste.o f/storag.o f/stp.o f/str.o f/sts.o f/stt.o f/stu.o \
f/stv.o f/stw.o f/symbol.o f/target.o f/top.o f/type.o f/where.o
@@ -320,7 +320,6 @@ f77.uninstall: installdirs
f77.mostlyclean:
-rm -f f/*$(objext)
-rm -f f/*$(coverageexts)
- -rm -f f/f-options.c f/f-options.h
-rm -f f/fini$(build_exeext) f/stamp-str f/str-*.h f/str-*.j
-rm -f f/intdoc$(build_exeext) f/ansify$(build_exeext) f/intdoc.h0
-rm -f g77.aux g77.cps g77.ky g77.toc g77.vr g77.fn g77.kys \
@@ -543,14 +542,8 @@ f/top.o: f/top.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/top.h f/malloc.h f/where.h \
f/info-w.def f/target.h f/lex.h f/type.h f/lab.h f/storag.h \
f/symbol.h f/symbol.def f/equiv.h f/global.h f/name.h f/intrin.h \
f/intrin.def f/data.h f/expr.h f/implic.h f/src.h f/st.h flags.h \
- toplev.h coretypes.h $(TM_H) opts.h f/f-options.h
+ toplev.h coretypes.h $(TM_H) opts.h options.h
f/type.o: f/type.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/type.h f/malloc.h \
coretypes.h $(TM_H)
f/where.o: f/where.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/where.h glimits.h \
f/top.h f/malloc.h f/lex.h $(GGC_H) gt-f-where.h coretypes.h $(TM_H)
-
-f/f-options.c: f/lang.opt opts.sh f/f-options.h
-
-f/f-options.h: f/lang.opt opts.sh
- AWK=$(AWK) $(SHELL) $(srcdir)/opts.sh f/f-options.c \
- f/f-options.h $(srcdir)/f/lang.opt
diff --git a/gcc/f/com.c b/gcc/f/com.c
index 4de5d6c18ae..6750fc32f20 100644
--- a/gcc/f/com.c
+++ b/gcc/f/com.c
@@ -14125,7 +14125,6 @@ insert_block (tree block)
static bool ffe_init PARAMS ((void));
static void ffe_finish PARAMS ((void));
static bool ffe_post_options PARAMS ((const char **));
-static int ffe_init_options PARAMS ((void));
static void ffe_print_identifier PARAMS ((FILE *, tree, int));
struct language_function GTY(())
@@ -14265,20 +14264,6 @@ ffe_finish ()
fclose (finput);
}
-static int
-ffe_init_options ()
-{
- /* Set default options for Fortran. */
- flag_move_all_movables = 1;
- flag_reduce_all_givs = 1;
- flag_argument_noalias = 2;
- flag_merge_constants = 2;
- flag_errno_math = 0;
- flag_complex_divide_method = 1;
-
- return 0;
-}
-
static bool
ffe_mark_addressable (tree exp)
{
diff --git a/gcc/f/top.c b/gcc/f/top.c
index 715e61ceebb..7ca2db998b8 100644
--- a/gcc/f/top.c
+++ b/gcc/f/top.c
@@ -47,7 +47,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "lex.h"
#include "malloc.h"
#include "name.h"
-#include "f-options.h"
+#include "options.h"
#include "opts.h"
#include "src.h"
#include "st.h"
@@ -155,6 +155,21 @@ ffe_is_digit_string_ (const char *s)
return (p != s) && (*p == '\0');
}
+/* Get ready for options handling. */
+int
+ffe_init_options ()
+{
+ /* Set default options for Fortran. */
+ flag_move_all_movables = 1;
+ flag_reduce_all_givs = 1;
+ flag_argument_noalias = 2;
+ flag_merge_constants = 2;
+ flag_errno_math = 0;
+ flag_complex_divide_method = 1;
+
+ return CL_F77;
+}
+
/* Handle command-line options. Returns 0 if unrecognized, 1 if
recognized and handled. */
int
@@ -176,7 +191,7 @@ ffe_handle_option (size_t scode, const char *arg, int value)
switch (code)
{
default:
- return 0;
+ abort();
case OPT_fversion:
ffe_set_is_version (TRUE);
diff --git a/gcc/f/top.h b/gcc/f/top.h
index 60c099512c4..041dc16ef62 100644
--- a/gcc/f/top.h
+++ b/gcc/f/top.h
@@ -141,6 +141,7 @@ extern bool ffe_in_4;
/* Declare functions with prototypes. */
+int ffe_init_options (void);
int ffe_handle_option (size_t code, const char *arg, int on);
void ffe_file (ffewhereFile wf, FILE *f);
void ffe_init_0 (void);