aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran/runtime')
-rw-r--r--libgfortran/runtime/compile_options.c7
-rw-r--r--libgfortran/runtime/error.c5
2 files changed, 9 insertions, 3 deletions
diff --git a/libgfortran/runtime/compile_options.c b/libgfortran/runtime/compile_options.c
index e2a2ffa4c80..ce5e52a34da 100644
--- a/libgfortran/runtime/compile_options.c
+++ b/libgfortran/runtime/compile_options.c
@@ -37,13 +37,15 @@ compile_options_t compile_options;
/* Prototypes */
-extern void set_std (GFC_INTEGER_4, GFC_INTEGER_4);
+extern void set_std (GFC_INTEGER_4, GFC_INTEGER_4, GFC_INTEGER_4);
export_proto(set_std);
void
-set_std (GFC_INTEGER_4 warn_std, GFC_INTEGER_4 allow_std)
+set_std (GFC_INTEGER_4 warn_std, GFC_INTEGER_4 allow_std,
+ GFC_INTEGER_4 pedantic)
{
+ compile_options.pedantic = pedantic;
compile_options.warn_std = warn_std;
compile_options.allow_std = allow_std;
}
@@ -58,6 +60,7 @@ init_compile_options (void)
| GFC_STD_F2003 | GFC_STD_LEGACY;
compile_options.allow_std = GFC_STD_F95_OBS | GFC_STD_F95_DEL
| GFC_STD_F2003 | GFC_STD_F95 | GFC_STD_F77 | GFC_STD_GNU | GFC_STD_LEGACY;
+ compile_options.pedantic = 0;
}
/* Function called by the front-end to tell us the
diff --git a/libgfortran/runtime/error.c b/libgfortran/runtime/error.c
index 2d3c0689adc..b25cd0c8c16 100644
--- a/libgfortran/runtime/error.c
+++ b/libgfortran/runtime/error.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
Contributed by Andy Vaught
This file is part of the GNU Fortran 95 runtime library (libgfortran).
@@ -508,6 +508,9 @@ notify_std (int std, const char * message)
{
int warning;
+ if (!compile_options.pedantic)
+ return SUCCESS;
+
warning = compile_options.warn_std & std;
if ((compile_options.allow_std & std) != 0 && !warning)
return SUCCESS;