* g++.dg/cpp0x/constexpr-53094-2.C: Ignore non-standard ABI
[official-gcc.git] / gcc / fortran / libgfortran.h
blob30b3b7bcee7275882d14911b0d6f2e70458c860c
1 /* Header file to the Fortran front-end and runtime library
2 Copyright (C) 2007-2013 Free Software Foundation, Inc.
4 This file is part of GCC.
6 GCC is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 3, or (at your option) any later
9 version.
11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 for more details.
16 You should have received a copy of the GNU General Public License
17 along with GCC; see the file COPYING3. If not see
18 <http://www.gnu.org/licenses/>. */
21 /* Flags to specify which standard/extension contains a feature.
22 Note that no features were obsoleted nor deleted in F2003.
23 Please remember to keep those definitions in sync with
24 gfortran.texi. */
25 #define GFC_STD_F2008_TS (1<<9) /* POST-F2008 technical reports. */
26 #define GFC_STD_F2008_OBS (1<<8) /* Obsolescent in F2008. */
27 #define GFC_STD_F2008 (1<<7) /* New in F2008. */
28 #define GFC_STD_LEGACY (1<<6) /* Backward compatibility. */
29 #define GFC_STD_GNU (1<<5) /* GNU Fortran extension. */
30 #define GFC_STD_F2003 (1<<4) /* New in F2003. */
31 #define GFC_STD_F95 (1<<3) /* New in F95. */
32 #define GFC_STD_F95_DEL (1<<2) /* Deleted in F95. */
33 #define GFC_STD_F95_OBS (1<<1) /* Obsolescent in F95. */
34 #define GFC_STD_F77 (1<<0) /* Included in F77, but not deleted or
35 obsolescent in later standards. */
38 /* Bitmasks for the various FPE that can be enabled. */
39 #define GFC_FPE_INVALID (1<<0)
40 #define GFC_FPE_DENORMAL (1<<1)
41 #define GFC_FPE_ZERO (1<<2)
42 #define GFC_FPE_OVERFLOW (1<<3)
43 #define GFC_FPE_UNDERFLOW (1<<4)
44 #define GFC_FPE_INEXACT (1<<5)
47 /* Bitmasks for the various runtime checks that can be enabled. */
48 #define GFC_RTCHECK_BOUNDS (1<<0)
49 #define GFC_RTCHECK_ARRAY_TEMPS (1<<1)
50 #define GFC_RTCHECK_RECURSION (1<<2)
51 #define GFC_RTCHECK_DO (1<<3)
52 #define GFC_RTCHECK_POINTER (1<<4)
53 #define GFC_RTCHECK_MEM (1<<5)
54 #define GFC_RTCHECK_ALL (GFC_RTCHECK_BOUNDS | GFC_RTCHECK_ARRAY_TEMPS \
55 | GFC_RTCHECK_RECURSION | GFC_RTCHECK_DO \
56 | GFC_RTCHECK_POINTER | GFC_RTCHECK_MEM)
59 /* Possible values for the CONVERT I/O specifier. */
60 typedef enum
62 GFC_CONVERT_NONE = -1,
63 GFC_CONVERT_NATIVE = 0,
64 GFC_CONVERT_SWAP,
65 GFC_CONVERT_BIG,
66 GFC_CONVERT_LITTLE
68 unit_convert;
71 /* Runtime errors. */
72 typedef enum
74 LIBERROR_FIRST = -3, /* Marker for the first error. */
75 LIBERROR_EOR = -2, /* End of record, must be negative. */
76 LIBERROR_END = -1, /* End of file, must be negative. */
77 LIBERROR_OK = 0, /* Indicates success, must be zero. */
78 LIBERROR_OS = 5000, /* OS error, more info in errno. */
79 LIBERROR_OPTION_CONFLICT,
80 LIBERROR_BAD_OPTION,
81 LIBERROR_MISSING_OPTION,
82 LIBERROR_ALREADY_OPEN,
83 LIBERROR_BAD_UNIT,
84 LIBERROR_FORMAT,
85 LIBERROR_BAD_ACTION,
86 LIBERROR_ENDFILE,
87 LIBERROR_BAD_US,
88 LIBERROR_READ_VALUE,
89 LIBERROR_READ_OVERFLOW,
90 LIBERROR_INTERNAL,
91 LIBERROR_INTERNAL_UNIT,
92 LIBERROR_ALLOCATION,
93 LIBERROR_DIRECT_EOR,
94 LIBERROR_SHORT_RECORD,
95 LIBERROR_CORRUPT_FILE,
96 LIBERROR_INQUIRE_INTERNAL_UNIT, /* Must be different from STAT_STOPPED_IMAGE. */
97 LIBERROR_LAST /* Not a real error, the last error # + 1. */
99 libgfortran_error_codes;
101 /* Must kept in sync with libgfortrancaf.h. */
102 typedef enum
104 GFC_STAT_UNLOCKED = 0,
105 GFC_STAT_LOCKED,
106 GFC_STAT_LOCKED_OTHER_IMAGE,
107 GFC_STAT_STOPPED_IMAGE = 6000 /* See LIBERROR_INQUIRE_INTERNAL_UNIT above. */
109 libgfortran_stat_codes;
111 /* Default unit number for preconnected standard input and output. */
112 #define GFC_STDIN_UNIT_NUMBER 5
113 #define GFC_STDOUT_UNIT_NUMBER 6
114 #define GFC_STDERR_UNIT_NUMBER 0
117 /* FIXME: Increase to 15 for Fortran 2008. Also needs changes to
118 GFC_DTYPE_RANK_MASK. See PR 36825. */
119 #define GFC_MAX_DIMENSIONS 7
121 #define GFC_DTYPE_RANK_MASK 0x07
122 #define GFC_DTYPE_TYPE_SHIFT 3
123 #define GFC_DTYPE_TYPE_MASK 0x38
124 #define GFC_DTYPE_SIZE_SHIFT 6
126 /* Basic types. BT_VOID is used by ISO C Binding so funcs like c_f_pointer
127 can take any arg with the pointer attribute as a param. These are also
128 used in the run-time library for IO. */
129 typedef enum
130 { BT_UNKNOWN = 0, BT_INTEGER, BT_LOGICAL, BT_REAL, BT_COMPLEX,
131 BT_DERIVED, BT_CHARACTER, BT_CLASS, BT_PROCEDURE, BT_HOLLERITH, BT_VOID,
132 BT_ASSUMED