summaryrefslogtreecommitdiff
path: root/libgfortran/runtime
diff options
context:
space:
mode:
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>2007-07-15 16:26:22 +0000
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>2007-07-15 16:26:22 +0000
commitd4862c77ebd88b4abbb75f8eda2d711107037e24 (patch)
tree5dd0bb4b6a1ee0a04fd08df75bf78b4ef75d74d7 /libgfortran/runtime
parent5a30047cc1166eb6ec0def314673f9535c5d44b7 (diff)
downloadgcc-d4862c77ebd88b4abbb75f8eda2d711107037e24.tar.gz
2007-07-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR fortran/32611 * runtime/compile_options.c (set_std): Remove. (set_options): New function. (init_compile_options): Add initialization for -fsign-zero option. * gfortran.map (GFORTRAN_1.0): Rename _gfortran_set_std into _gfortran_set_options. * libgfortran.h (compile_options_t): Add sign_zero field. * io/write.c (output_float): Use the sign bit of the value to determine if a negative sign should be emitted for zero values. Do not emit the negative sign for zero if -fno-sign-zero was set during compile. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126654 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/runtime')
-rw-r--r--libgfortran/runtime/compile_options.c33
1 files changed, 18 insertions, 15 deletions
diff --git a/libgfortran/runtime/compile_options.c b/libgfortran/runtime/compile_options.c
index dc404da7b53..0976a39eade 100644
--- a/libgfortran/runtime/compile_options.c
+++ b/libgfortran/runtime/compile_options.c
@@ -1,5 +1,5 @@
/* Handling of compile-time options that influence the library.
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007 Free Software Foundation, Inc.
This file is part of the GNU Fortran 95 runtime library (libgfortran).
@@ -35,23 +35,25 @@ Boston, MA 02110-1301, USA. */
/* Useful compile-time options will be stored in here. */
compile_options_t compile_options;
-
-/* Prototypes */
-extern void set_std (GFC_INTEGER_4, GFC_INTEGER_4, GFC_INTEGER_4,
- GFC_INTEGER_4, GFC_INTEGER_4);
-export_proto(set_std);
-
+/* Set the usual compile-time options. */
+extern void set_options (int , int []);
+export_proto(set_options);
void
-set_std (GFC_INTEGER_4 warn_std, GFC_INTEGER_4 allow_std,
- GFC_INTEGER_4 pedantic, GFC_INTEGER_4 dump_core,
- GFC_INTEGER_4 backtrace)
+set_options (int num, int options[])
{
- compile_options.pedantic = pedantic;
- compile_options.warn_std = warn_std;
- compile_options.allow_std = allow_std;
- compile_options.dump_core = dump_core;
- compile_options.backtrace = backtrace;
+ if (num >= 1)
+ compile_options.warn_std = options[0];
+ if (num >= 2)
+ compile_options.allow_std = options[1];
+ if (num >= 3)
+ compile_options.pedantic = options[2];
+ if (num >= 4)
+ compile_options.dump_core = options[3];
+ if (num >= 5)
+ compile_options.backtrace = options[4];
+ if (num >= 6)
+ compile_options.sign_zero = options[5];
}
@@ -67,6 +69,7 @@ init_compile_options (void)
compile_options.pedantic = 0;
compile_options.dump_core = 0;
compile_options.backtrace = 0;
+ compile_options.sign_zero = 1;
}
/* Function called by the front-end to tell us the