This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch,fortran] Harmonize gfc_notify_std (GFC_STD_F2003


:ADDPATCH fortran:

As suggested, we want to use "Fortran 2003:" for GFC_STD_F2003/-std=f95
errors.
I also changed:
  ERROR (...) Fortran 2003: CHAR intrinsic allowed as actual argument at %L
to
  ERROR (...) Fortran 2003: CHAR as actual argument at %L

This is not only in line with the other messages and shorter, but I
think also clearer.
If one glances over the current message, you might read it as "error:
You used char as actual argument, which is allowed", which is puzzling
until you realize what is meant by "Fortran 2003".

Tobias


2006-11-06  Tobias Burnus  <burnus@net-b.de>

    * decl.c (match_attr_spec, gfc_match_enum): Unify gfc_notify_std
message for GFC_STD_F2003.
    * array.c (gfc_match_array_constructor): Unify gfc_notify_std
message for GFC_STD_F2003.
    * io.c (check_io_constraints): Unify gfc_notify_std message for
GFC_STD_F2003.
    * resolve.c (resolve_actual_arglist): Unify gfc_notify_std message
for GFC_STD_F2003.
Index: gcc/fortran/decl.c
===================================================================
--- gcc/fortran/decl.c	(Revision 118516)
+++ gcc/fortran/decl.c	(Arbeitskopie)
@@ -2191,8 +2195,8 @@
 	  if (d == DECL_ALLOCATABLE)
 	    {
 	      if (gfc_notify_std (GFC_STD_F2003, 
-				   "In the selected standard, the ALLOCATABLE "
-				   "attribute at %C is not allowed in a TYPE "
+				   "Fortran 2003: ALLOCATABLE "
+				   "attribute at %C in a TYPE "
 				   "definition") == FAILURE)         
 		{
 		  m = MATCH_ERROR;
@@ -4143,7 +4209,7 @@
     return m;
 
   if (gfc_notify_std (GFC_STD_F2003, 
-		      "New in Fortran 2003: ENUM AND ENUMERATOR at %C")
+		      "Fortran 2003: ENUM AND ENUMERATOR at %C")
       == FAILURE)
     return MATCH_ERROR;
 
Index: gcc/fortran/array.c
===================================================================
--- gcc/fortran/array.c	(Revision 118516)
+++ gcc/fortran/array.c	(Arbeitskopie)
@@ -874,7 +874,7 @@
         return MATCH_NO;
       else
         {
-          if (gfc_notify_std (GFC_STD_F2003, "New in Fortran 2003: [...] "
+          if (gfc_notify_std (GFC_STD_F2003, "Fortran 2003: [...] "
                               "style array constructors at %C") == FAILURE)
             return MATCH_ERROR;
           end_delim = " ]";
Index: gcc/fortran/io.c
===================================================================
--- gcc/fortran/io.c	(Revision 118516)
+++ gcc/fortran/io.c	(Arbeitskopie)
@@ -2599,7 +2599,7 @@
       if (dt->namelist != NULL)
         {
           if (gfc_notify_std(GFC_STD_F2003,
-                         "Internal file at %L is incompatible with namelist",
+                         "Fortran 2003: Internal file at %L with namelist",
                          &expr->where) == FAILURE)
             m = MATCH_ERROR;
         }
Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c	(Revision 118516)
+++ gcc/fortran/resolve.c	(Arbeitskopie)
@@ -888,7 +888,7 @@
 	     function allowed as actual argument in F2003 and not allowed
 	     in F95.  */
 	    gfc_notify_std (GFC_STD_F2003, "Fortran 2003: CHAR intrinsic "
-			    "allowed as actual argument at %L", &e->where);
+			    "as actual argument at %L", &e->where);
 
 	  if (sym->attr.contained && !sym->attr.use_assoc
 	      && sym->ns->proc_name->attr.flavor != FL_MODULE)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]