OSDN Git Service

fdc7b780cf7d1464741524a7b8cab26135b68f88
[pf3gnuchains/gcc-fork.git] / libgfortran / runtime / compile_options.c
1 /* Handling of compile-time options that influence the library.
2    Copyright (C) 2005 Free Software Foundation, Inc.
3
4 This file is part of the GNU Fortran 95 runtime library (libgfortran).
5
6 Libgfortran is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
10
11 In addition to the permissions in the GNU General Public License, the
12 Free Software Foundation gives you unlimited permission to link the
13 compiled version of this file into combinations with other programs,
14 and to distribute those combinations without any restriction coming
15 from the use of this file.  (The General Public License restrictions
16 do apply in other respects; for example, they cover modification of
17 the file, and distribution when not linked into a combine
18 executable.)
19
20 Libgfortran is distributed in the hope that it will be useful,
21 but WITHOUT ANY WARRANTY; without even the implied warranty of
22 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23 GNU General Public License for more details.
24
25 You should have received a copy of the GNU General Public License
26 along with libgfortran; see the file COPYING.  If not, write to
27 the Free Software Foundation, 51 Franklin Street, Fifth Floor,
28 Boston, MA 02110-1301, USA.  */
29
30 #include "config.h"
31
32 #include "libgfortran.h"
33
34
35 /* Useful compile-time options will be stored in here.  */
36 compile_options_t compile_options;
37
38
39 /* Prototypes */
40 extern void set_std (GFC_INTEGER_4, GFC_INTEGER_4);
41 export_proto(set_std);
42
43
44 void
45 set_std (GFC_INTEGER_4 warn_std, GFC_INTEGER_4 allow_std)
46 {
47   compile_options.warn_std = warn_std;
48   compile_options.allow_std = allow_std;
49 }
50
51
52 /* Default values for the compile-time options.  Keep in sync with
53    gcc/fortran/options.c (gfc_init_options).  */
54 void
55 init_compile_options (void)
56 {
57   compile_options.warn_std = GFC_STD_F95_OBS | GFC_STD_F95_DEL
58     | GFC_STD_F2003 | GFC_STD_LEGACY;
59   compile_options.allow_std = GFC_STD_F95_OBS | GFC_STD_F95_DEL
60     | GFC_STD_F2003 | GFC_STD_F95 | GFC_STD_F77 | GFC_STD_GNU | GFC_STD_LEGACY;
61 }