aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSa Liu <saliu@gcc.gnu.org>2008-05-15 12:51:56 +0000
committerSa Liu <saliu@gcc.gnu.org>2008-05-15 12:51:56 +0000
commit05e73743d5c48509ad97d996e0c5ad07d30edef7 (patch)
tree1174e9fa095e18d4a167bd2d98cc046678963e8a
parentec9231857bb739c9facebaeb52f9cacb4116a6d1 (diff)
downloadgcc-05e73743d5c48509ad97d996e0c5ad07d30edef7.zip
gcc-05e73743d5c48509ad97d996e0c5ad07d30edef7.tar.gz
gcc-05e73743d5c48509ad97d996e0c5ad07d30edef7.tar.bz2
New helper function to return the standard that supports this isocbinding symbol.Do not generate GNU extension symbols if std=f2003. Add new parameter to NAMED_INTCST.
From-SVN: r135341
-rw-r--r--gcc/fortran/symbol.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c
index 1d6867b..7f79ee3 100644
--- a/gcc/fortran/symbol.c
+++ b/gcc/fortran/symbol.c
@@ -3740,6 +3740,20 @@ build_formal_args (gfc_symbol *new_proc_sym,
gfc_current_ns = parent_ns;
}
+static int
+std_for_isocbinding_symbol (int id)
+{
+ switch (id)
+ {
+#define NAMED_INTCST(a,b,c,d) \
+ case a:\
+ return d;
+#include "iso-c-binding.def"
+#undef NAMED_INTCST
+ default:
+ return GFC_STD_F2003;
+ }
+}
/* Generate the given set of C interoperable kind objects, or all
interoperable kinds. This function will only be given kind objects
@@ -3765,6 +3779,8 @@ generate_isocbinding_symbol (const char *mod_name, iso_c_binding_symbol s,
char comp_name[(GFC_MAX_SYMBOL_LEN * 2) + 1];
int index;
+ if (gfc_notification_std (std_for_isocbinding_symbol (s)) == FAILURE)
+ return;
tmp_symtree = gfc_find_symtree (gfc_current_ns->sym_root, name);
/* Already exists in this scope so don't re-add it.
@@ -3788,7 +3804,7 @@ generate_isocbinding_symbol (const char *mod_name, iso_c_binding_symbol s,
switch (s)
{
-#define NAMED_INTCST(a,b,c) case a :
+#define NAMED_INTCST(a,b,c,d) case a :
#define NAMED_REALCST(a,b,c) case a :
#define NAMED_CMPXCST(a,b,c) case a :
#define NAMED_LOGCST(a,b,c) case a :