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] PR30681 "obsolescent" vs. "obsolete"


:ADDPATCH fortran:

This patch changes the word "Obsolete" to "Obsolescent" in the relevant error messages. The behavior remains the same. We throw an error instead of a warning with -std=f95 or -std=f2003 to discourage the use of these features which are in the "process of becoming obsolete"

The affected test cases are:
   gfortran.dg/assign.f90
   gfortran.dg/pr17229.f
   gfortran.dg/g77/20010519-1.f
   gfortran.dg/g77/960317-1.f
   gfortran.dg/g77/pr9258.f
   gfortran.dg/gomp/omp_dol.f90

I also looked in libgomp and found none. Regression tested. libgomp tested

I will commit to 4.3 shortly and to 4.2 and 4.1 if no one objects.

Regards,

Jerry

2007-02-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>

	PR fortran/30681
	* io.c (resolve_tag): Change "Obsolete" to "Obsolescent" in the
	relevant error message(s).
	* resolve.c (gfc_resolve_iterator), (resolve_branch): Same.
	* match.c (match_arithmetic_if), (gfc_match_if), (gfc_match_pause),
	(gfc_match_assign), (gfc_match_goto): Same.

Index: io.c
===================================================================
*** io.c	(revision 121678)
--- io.c	(working copy)
*************** resolve_tag (const io_tag *tag, gfc_expr
*** 1093,1099 ****
  	    }
  	  else if (e->ts.type == BT_INTEGER && e->expr_type == EXPR_VARIABLE)
  	    {
! 	      if (gfc_notify_std (GFC_STD_F95_DEL, "Obsolete: ASSIGNED "
  				  "variable in FORMAT tag at %L", &e->where)
  		  == FAILURE)
  		return FAILURE;
--- 1093,1099 ----
  	    }
  	  else if (e->ts.type == BT_INTEGER && e->expr_type == EXPR_VARIABLE)
  	    {
! 	      if (gfc_notify_std (GFC_STD_F95_DEL, "Obsolescent: ASSIGNED "
  				  "variable in FORMAT tag at %L", &e->where)
  		  == FAILURE)
  		return FAILURE;
Index: resolve.c
===================================================================
*** resolve.c	(revision 121678)
--- resolve.c	(working copy)
*************** gfc_resolve_iterator (gfc_iterator *iter
*** 3293,3299 ****
  {
  
    if (iter->var->ts.type == BT_REAL)
!     gfc_notify_std (GFC_STD_F95_DEL, "Obsolete: REAL DO loop iterator at %L",
  		    &iter->var->where);
  
    if (gfc_resolve_iterator_expr (iter->var, real_ok, "Loop variable")
--- 3293,3299 ----
  {
  
    if (iter->var->ts.type == BT_REAL)
!     gfc_notify_std (GFC_STD_F95_DEL, "Obsolescent: REAL DO loop iterator at %L",
  		    &iter->var->where);
  
    if (gfc_resolve_iterator_expr (iter->var, real_ok, "Loop variable")
*************** resolve_branch (gfc_st_label *label, gfc
*** 4459,4465 ****
  	  break;
  
        if (stack == NULL)
! 	gfc_notify_std (GFC_STD_F95_DEL, "Obsolete: GOTO at %L jumps to END "
  			"of construct at %L", &code->loc, &found->loc);
      }
  }
--- 4459,4465 ----
  	  break;
  
        if (stack == NULL)
! 	gfc_notify_std (GFC_STD_F95_DEL, "Obsolescent: GOTO at %L jumps to END "
  			"of construct at %L", &code->loc, &found->loc);
      }
  }
Index: match.c
===================================================================
*** match.c	(revision 121678)
--- match.c	(working copy)
*************** match_arithmetic_if (void)
*** 952,958 ****
        return MATCH_ERROR;
      }
  
!   if (gfc_notify_std (GFC_STD_F95_DEL, "Obsolete: arithmetic IF statement "
  		      "at %C") == FAILURE)
      return MATCH_ERROR;
  
--- 952,958 ----
        return MATCH_ERROR;
      }
  
!   if (gfc_notify_std (GFC_STD_F95_DEL, "Obsolescent: arithmetic IF statement "
  		      "at %C") == FAILURE)
      return MATCH_ERROR;
  
*************** gfc_match_if (gfc_statement *if_type)
*** 1025,1031 ****
  	  return MATCH_ERROR;
  	}
        
!       if (gfc_notify_std (GFC_STD_F95_DEL, "Obsolete: arithmetic IF "
  			  "statement at %C") == FAILURE)
  	return MATCH_ERROR;
  
--- 1025,1031 ----
  	  return MATCH_ERROR;
  	}
        
!       if (gfc_notify_std (GFC_STD_F95_DEL, "Obsolescent: arithmetic IF "
  			  "statement at %C") == FAILURE)
  	return MATCH_ERROR;
  
*************** gfc_match_pause (void)
*** 1531,1537 ****
    m = gfc_match_stopcode (ST_PAUSE);
    if (m == MATCH_YES)
      {
!       if (gfc_notify_std (GFC_STD_F95_DEL, "Obsolete: PAUSE statement at %C")
  	  == FAILURE)
  	m = MATCH_ERROR;
      }
--- 1531,1537 ----
    m = gfc_match_stopcode (ST_PAUSE);
    if (m == MATCH_YES)
      {
!       if (gfc_notify_std (GFC_STD_F95_DEL, "Obsolescent: PAUSE statement at %C")
  	  == FAILURE)
  	m = MATCH_ERROR;
      }
*************** gfc_match_assign (void)
*** 1578,1584 ****
  	return MATCH_ERROR;
        if (gfc_match (" to %v%t", &expr) == MATCH_YES)
  	{
! 	  if (gfc_notify_std (GFC_STD_F95_DEL, "Obsolete: ASSIGN "
  			      "statement at %C")
  	      == FAILURE)
  	    return MATCH_ERROR;
--- 1578,1584 ----
  	return MATCH_ERROR;
        if (gfc_match (" to %v%t", &expr) == MATCH_YES)
  	{
! 	  if (gfc_notify_std (GFC_STD_F95_DEL, "Obsolescent: ASSIGN "
  			      "statement at %C")
  	      == FAILURE)
  	    return MATCH_ERROR;
*************** gfc_match_goto (void)
*** 1624,1630 ****
  
    if (gfc_match_variable (&expr, 0) == MATCH_YES)
      {
!       if (gfc_notify_std (GFC_STD_F95_DEL, "Obsolete: Assigned GOTO "
  			  "statement at %C")
  	  == FAILURE)
  	return MATCH_ERROR;
--- 1624,1630 ----
  
    if (gfc_match_variable (&expr, 0) == MATCH_YES)
      {
!       if (gfc_notify_std (GFC_STD_F95_DEL, "Obsolescent: Assigned GOTO "
  			  "statement at %C")
  	  == FAILURE)
  	return MATCH_ERROR;

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