public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: egcs-980129, fixed ambiguous `else' warnings in the gcc/f/ dir.
@ 1998-02-12 20:07 Kaveh R. Ghazi
  1998-02-12 20:07 ` Richard Henderson
  0 siblings, 1 reply; 16+ messages in thread
From: Kaveh R. Ghazi @ 1998-02-12 20:07 UTC (permalink / raw)
  To: rth; +Cc: egcs

 > From: Richard Henderson <rth@cygnus.com>
 > 
 > On Wed, Feb 11, 1998 at 04:57:39PM -0500, Kaveh R. Ghazi wrote:
 > > +++ egcs-980129/gcc/f/expr.c  Tue Feb  3 15:50:59 1998
 > > @@ -8761,10 +8761,12 @@
 > >    else
 > >      {                                /* The normal stuff. */
 > >        if (nbt == lbt)
 > > -     if (nbt == rbt)
 > > -       nkt = ffeinfo_kindtype_max (nbt, lkt, rkt);
 > > -     else
 > > -       nkt = lkt;
 > > +     {
 > > +       if (nbt == rbt)
 > > +         nkt = ffeinfo_kindtype_max (nbt, lkt, rkt);
 > > +       else
 > > +         nkt = lkt;
 > > +     }
 > >        else if (nbt == rbt)
 > >       nkt = rkt;
 > >        else
 >  
 > It would be my preference that the pieces of the patch like this,
 > in which the if-then-else tree is full, _not_ be installed.  This
 > will remind us that we should fix the bug in the warning code.
 > r~

	Is it a bug or a feature?  Ie, is it good coding style to not
use braces even if the if-then-else tree is full?

		--Kaveh
--
Kaveh R. Ghazi			Project Manager / Custom Development
ghazi@caip.rutgers.edu		ICon CMT Corp.

^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: egcs-980129, fixed ambiguous `else' warnings in the gcc/f/ dir.
@ 1998-02-13 10:58 Kaveh R. Ghazi
  1998-02-16  4:57 ` Bernd Schmidt
  0 siblings, 1 reply; 16+ messages in thread
From: Kaveh R. Ghazi @ 1998-02-13 10:58 UTC (permalink / raw)
  To: crux; +Cc: egcs, rth

 > From: Bernd Schmidt <crux@Pool.Informatik.RWTH-Aachen.DE>
 > 
 > >  > Coding style aside, the warning tells you that it is ambiguous when
 > >  > it is not.  If the tree is full, there is exactly one way it can be
 > >  > parsed.  Thus, a bug, IMO.
 > >  > r~
 > > 
 > >       Okay, then we should leave in all of them until its fixed.  That
 > > way when the fix is in, we see that the ones that should be noisy are
 > > still there and the ones that should be quiet are gone. 
 > > 
 > >       Is anyone (the original author) working on this?
 >  
 > I'll submit a fix for this on Monday.
 > Bernd

	Lot's of gcc's warnings emit diagnostics about things that are
coding style issues, not actual problems.

	So given that the GNU coding standards mention this particular
case, perhaps whatever fix you decide on should simply change the
wording but still say something even when an if-then-else tree is full. 
I recommend "Suggest braces around nested if-then-else." or something
similar. 

	This would be similar to the suggestion for parens around
assignments used as truth values. 

		--Kaveh
--
Kaveh R. Ghazi			Project Manager / Custom Development
ghazi@caip.rutgers.edu		ICon CMT Corp.

^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: egcs-980129, fixed ambiguous `else' warnings in the gcc/f/ dir.
@ 1998-02-12 20:07 Kaveh R. Ghazi
  1998-02-13 10:31 ` Bernd Schmidt
  0 siblings, 1 reply; 16+ messages in thread
From: Kaveh R. Ghazi @ 1998-02-12 20:07 UTC (permalink / raw)
  To: rth; +Cc: egcs

 > On Thu, Feb 12, 1998 at 01:30:19PM -0500, Kaveh R. Ghazi wrote:
 > >       Is it a bug or a feature?  Ie, is it good coding style to not
 > > use braces even if the if-then-else tree is full?
 >  
 > Coding style aside, the warning tells you that it is ambiguous when
 > it is not.  If the tree is full, there is exactly one way it can be
 > parsed.  Thus, a bug, IMO.
 > r~

	Okay, then we should leave in all of them until its fixed.  That
way when the fix is in, we see that the ones that should be noisy are
still there and the ones that should be quiet are gone. 

	Is anyone (the original author) working on this?

		--Kaveh
--
Kaveh R. Ghazi			Project Manager / Custom Development
ghazi@caip.rutgers.edu		ICon CMT Corp.

^ permalink raw reply	[flat|nested] 16+ messages in thread
* egcs-980129, fixed ambiguous `else' warnings in the gcc/f/ dir.
@ 1998-02-11 18:20 Kaveh R. Ghazi
  1998-02-12  2:36 ` Richard Henderson
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Kaveh R. Ghazi @ 1998-02-11 18:20 UTC (permalink / raw)
  To: egcs

	This patch cleans up the ambiguous `else' warnings in the
egcs/gcc/f/ directory.

		--Kaveh


Wed Feb 11 14:40:36 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * com.c (type_for_mode): Add explicit braces to avoid ambiguous `else'.
 
        * expr.c (ffeexpr_type_combine): Likewise.
        (ffeexpr_reduce_): Likewise.
        (ffeexpr_declare_parenthesized_): Likewise.
 
        * src.c (ffesrc_strcmp_1ns2i): Likewise.
        (ffesrc_strcmp_2c): Likewise.
        (ffesrc_strncmp_2c): Likewise.
 
        * stb.c (ffestb_halt1_): Likewise.
        (ffestb_R90910_): Likewise.
        (ffestb_R9109_): Likewise.
 
        * stc.c (ffestc_R544_equiv_): Likewise.
 
        * std.c (ffestd_subr_copy_easy_): Likewise.
        (ffestd_R1001dump_): Likewise.
        (ffestd_R1001dump_1005_1_): Likewise.
        (ffestd_R1001dump_1005_2_): Likewise.
        (ffestd_R1001dump_1005_3_): Likewise.
        (ffestd_R1001dump_1005_4_): Likewise.
        (ffestd_R1001dump_1005_5_): Likewise.
        (ffestd_R1001dump_1010_2_): Likewise.
 
        * ste.c (ffeste_R840): Likewise.
 
        * sts.c (ffests_puttext): Likewise.
 
        * symbol.c (ffesymbol_check_token_): Likewise.
 
        * target.c (ffetarget_real1): Likewise.
        (ffetarget_real2): Likewise.
 
 

diff -r -u orig/egcs-980129/gcc/f/com.c egcs-980129/gcc/f/com.c
--- orig/egcs-980129/gcc/f/com.c	Thu Dec 18 18:11:42 1997
+++ egcs-980129/gcc/f/com.c	Tue Feb  3 15:48:22 1998
@@ -15481,10 +15481,12 @@
       {
 	if (((t = ffecom_tree_type[i][j]) != NULL_TREE)
 	    && (mode == TYPE_MODE (t)))
-	  if ((i == FFEINFO_basictypeINTEGER) && unsignedp)
-	    return ffecom_tree_type[FFEINFO_basictypeHOLLERITH][j];
-	  else
-	    return t;
+	  {
+	    if ((i == FFEINFO_basictypeINTEGER) && unsignedp)
+	      return ffecom_tree_type[FFEINFO_basictypeHOLLERITH][j];
+	    else
+	      return t;
+	  }
       }
 
   return 0;
diff -r -u orig/egcs-980129/gcc/f/expr.c egcs-980129/gcc/f/expr.c
--- orig/egcs-980129/gcc/f/expr.c	Wed Oct  1 03:27:43 1997
+++ egcs-980129/gcc/f/expr.c	Tue Feb  3 15:50:59 1998
@@ -8761,10 +8761,12 @@
   else
     {				/* The normal stuff. */
       if (nbt == lbt)
-	if (nbt == rbt)
-	  nkt = ffeinfo_kindtype_max (nbt, lkt, rkt);
-	else
-	  nkt = lkt;
+	{
+	  if (nbt == rbt)
+	    nkt = ffeinfo_kindtype_max (nbt, lkt, rkt);
+	  else
+	    nkt = lkt;
+	}
       else if (nbt == rbt)
 	nkt = rkt;
       else
@@ -10022,26 +10024,30 @@
 	      && (left_operand->previous->type != FFEEXPR_exprtypeOPERAND_)
 	      && (left_operand->previous->u.operator.op
 		  == FFEEXPR_operatorSUBTRACT_))
-	    if (left_operand->previous->type == FFEEXPR_exprtypeUNARY_)
-	      ffetarget_integer_bad_magical_precedence (left_operand->token,
-					      left_operand->previous->token,
-							operator->token);
-	    else
-	      ffetarget_integer_bad_magical_precedence_binary
-		(left_operand->token,
-		 left_operand->previous->token,
-		 operator->token);
+	    {
+	      if (left_operand->previous->type == FFEEXPR_exprtypeUNARY_)
+		ffetarget_integer_bad_magical_precedence (left_operand->token,
+							  left_operand->previous->token,
+							  operator->token);
+	      else
+		ffetarget_integer_bad_magical_precedence_binary
+		  (left_operand->token,
+		   left_operand->previous->token,
+		   operator->token);
+	    }
 	  else
 	    ffetarget_integer_bad_magical (left_operand->token);
 	}
       if ((ffebld_op (expr) == FFEBLD_opCONTER)
 	  && (ffebld_conter_orig (expr) == NULL)
 	  && ffebld_constant_is_magical (constnode = ffebld_conter (expr)))
-	if (submag)
-	  ffetarget_integer_bad_magical_binary (operand->token,
-						operator->token);
-	else
-	  ffetarget_integer_bad_magical (operand->token);
+	{
+	  if (submag)
+	    ffetarget_integer_bad_magical_binary (operand->token,
+						  operator->token);
+	  else
+	    ffetarget_integer_bad_magical (operand->token);
+	}
       ffeexpr_stack_->exprstack = left_operand->previous;	/* Pops binary-op
 								   operands off stack. */
       ffeexpr_expr_kill_ (left_operand);
@@ -17902,13 +17908,15 @@
 
 	case FFEINFO_kindENTITY:
 	  if (ffesymbol_rank (s) == 0)
-	    if (ffesymbol_basictype (s) == FFEINFO_basictypeCHARACTER)
-	      *paren_type = FFEEXPR_parentypeSUBSTRING_;
-	    else
-	      {
-		bad = TRUE;
-		*paren_type = FFEEXPR_parentypeANY_;
-	      }
+	    {
+	      if (ffesymbol_basictype (s) == FFEINFO_basictypeCHARACTER)
+		*paren_type = FFEEXPR_parentypeSUBSTRING_;
+	      else
+		{
+		  bad = TRUE;
+		  *paren_type = FFEEXPR_parentypeANY_;
+		}
+	    }
 	  else
 	    *paren_type = FFEEXPR_parentypeARRAY_;
 	  break;
@@ -18029,15 +18037,17 @@
 
 	case FFEINFO_kindENTITY:
 	  if (ffesymbol_rank (s) == 0)
-	    if (ffeexpr_stack_->context == FFEEXPR_contextEQUIVALENCE)
-	      *paren_type = FFEEXPR_parentypeEQUIVALENCE_;
-	    else if (ffesymbol_basictype (s) == FFEINFO_basictypeCHARACTER)
-	      *paren_type = FFEEXPR_parentypeSUBSTRING_;
-	    else
-	      {
-		bad = TRUE;
-		*paren_type = FFEEXPR_parentypeANY_;
-	      }
+	    {
+	      if (ffeexpr_stack_->context == FFEEXPR_contextEQUIVALENCE)
+		*paren_type = FFEEXPR_parentypeEQUIVALENCE_;
+	      else if (ffesymbol_basictype (s) == FFEINFO_basictypeCHARACTER)
+		*paren_type = FFEEXPR_parentypeSUBSTRING_;
+	      else
+		{
+		  bad = TRUE;
+		  *paren_type = FFEEXPR_parentypeANY_;
+		}
+	    }
 	  else
 	    *paren_type = FFEEXPR_parentypeARRAY_;
 	  break;
diff -r -u orig/egcs-980129/gcc/f/src.c egcs-980129/gcc/f/src.c
--- orig/egcs-980129/gcc/f/src.c	Tue Aug 12 03:47:36 1997
+++ egcs-980129/gcc/f/src.c	Tue Feb  3 16:00:29 1998
@@ -234,10 +234,12 @@
 	  c = ffesrc_toupper (c);	/* Upcase source. */
 	  d = ffesrc_toupper (*str_ic);	/* Upcase InitialCaps char. */
 	  if (c != d)
-	    if ((d != '\0') && (c < d))
-	      return -1;
-	    else
-	      return 1;
+	    {
+	      if ((d != '\0') && (c < d))
+		return -1;
+	      else
+		return 1;
+	    }
 	}
       break;
 
@@ -247,10 +249,12 @@
 	  c = ffesrc_char_source (*var);	/* Transform source. */
 	  d = ffesrc_toupper (*str_ic);	/* Transform InitialCaps char. */
 	  if (c != d)
-	    if ((d != '\0') && (c < d))
-	      return -1;
-	    else
-	      return 1;
+	    {
+	      if ((d != '\0') && (c < d))
+		return -1;
+	      else
+		return 1;
+	    }
 	}
       break;
 
@@ -260,10 +264,12 @@
 	  c = ffesrc_char_source (*var);	/* Transform source. */
 	  d = ffesrc_tolower (*str_ic);	/* Transform InitialCaps char. */
 	  if (c != d)
-	    if ((d != '\0') && (c < d))
-	      return -1;
-	    else
-	      return 1;
+	    {
+	      if ((d != '\0') && (c < d))
+		return -1;
+	      else
+		return 1;
+	    }
 	}
       break;
 
@@ -320,10 +326,12 @@
 	{
 	  c = ffesrc_toupper (*var);	/* Upcase source. */
 	  if (c != *str_uc)
-	    if ((*str_uc != '\0') && (c < *str_uc))
-	      return -1;
-	    else
-	      return 1;
+	    {
+	      if ((*str_uc != '\0') && (c < *str_uc))
+		return -1;
+	      else
+		return 1;
+	    }
 	}
       if (*str_uc == '\0')
 	return 0;
@@ -388,10 +396,12 @@
 	{
 	  c = ffesrc_toupper (*var);	/* Upcase source. */
 	  if (c != *str_uc)
-	    if (c < *str_uc)
-	      return -1;
-	    else
-	      return 1;
+	    {
+	      if (c < *str_uc)
+		return -1;
+	      else
+		return 1;
+	    }
 	}
       return 0;
 
diff -r -u orig/egcs-980129/gcc/f/stb.c egcs-980129/gcc/f/stb.c
--- orig/egcs-980129/gcc/f/stb.c	Wed Aug 27 23:20:46 1997
+++ egcs-980129/gcc/f/stb.c	Tue Feb  3 16:09:24 1998
@@ -3773,10 +3773,12 @@
     case FFELEX_typeSEMICOLON:
       ffesta_confirmed ();
       if (!ffesta_is_inhibited ())
-	if (ffesta_first_kw == FFESTR_firstSTOP)
-	  ffestc_R842 (expr, ft);
-	else
-	  ffestc_R843 (expr, ft);
+	{
+	  if (ffesta_first_kw == FFESTR_firstSTOP)
+	    ffestc_R842 (expr, ft);
+	  else
+	    ffestc_R843 (expr, ft);
+	}
       return (ffelexHandler) ffesta_zero (t);
 
     default:
@@ -15553,11 +15555,13 @@
     case FFELEX_typeCOMMA:
     case FFELEX_typeCLOSE_PAREN:
       if (expr == NULL)
-	if (ffestb_local_.read.context == FFEEXPR_contextFILEFORMAT)
-	  ffestp_file.read.read_spec[ffestb_local_.read.ix]
-	    .value_is_label = TRUE;
-	else
-	  break;
+	{
+	  if (ffestb_local_.read.context == FFEEXPR_contextFILEFORMAT)
+	    ffestp_file.read.read_spec[ffestb_local_.read.ix]
+	      .value_is_label = TRUE;
+	  else
+	    break;
+	}
       ffestp_file.read.read_spec[ffestb_local_.read.ix].value_present
 	= TRUE;
       ffestp_file.read.read_spec[ffestb_local_.read.ix].value
@@ -16169,11 +16173,13 @@
     case FFELEX_typeCOMMA:
     case FFELEX_typeCLOSE_PAREN:
       if (expr == NULL)
-	if (ffestb_local_.write.context == FFEEXPR_contextFILEFORMAT)
-	  ffestp_file.write.write_spec[ffestb_local_.write.ix]
-	    .value_is_label = TRUE;
-	else
-	  break;
+	{
+	  if (ffestb_local_.write.context == FFEEXPR_contextFILEFORMAT)
+	    ffestp_file.write.write_spec[ffestb_local_.write.ix]
+	      .value_is_label = TRUE;
+	  else
+	    break;
+	}
       ffestp_file.write.write_spec[ffestb_local_.write.ix].value_present
 	= TRUE;
       ffestp_file.write.write_spec[ffestb_local_.write.ix].value
diff -r -u orig/egcs-980129/gcc/f/stc.c egcs-980129/gcc/f/stc.c
--- orig/egcs-980129/gcc/f/stc.c	Tue Aug 12 03:47:36 1997
+++ egcs-980129/gcc/f/stc.c	Tue Feb  3 16:11:06 1998
@@ -8238,16 +8238,18 @@
   /* See if symbol has an equivalence object already. */
 
   if (ffesymbol_equiv (s) != NULL)
-    if (ffestc_local_.equiv.eq == NULL)
-      ffestc_local_.equiv.eq = ffesymbol_equiv (s);	/* New equiv obj. */
-    else if (ffestc_local_.equiv.eq != ffesymbol_equiv (s))
-      {
-	ffestc_local_.equiv.eq = ffeequiv_merge (ffesymbol_equiv (s),
-						 ffestc_local_.equiv.eq,
-						 t);
-	if (ffestc_local_.equiv.eq == NULL)
-	  ffestc_local_.equiv.ok = FALSE;	/* Couldn't merge. */
-      }
+    {
+      if (ffestc_local_.equiv.eq == NULL)
+	ffestc_local_.equiv.eq = ffesymbol_equiv (s);	/* New equiv obj. */
+      else if (ffestc_local_.equiv.eq != ffesymbol_equiv (s))
+	{
+	  ffestc_local_.equiv.eq = ffeequiv_merge (ffesymbol_equiv (s),
+						   ffestc_local_.equiv.eq,
+						   t);
+	  if (ffestc_local_.equiv.eq == NULL)
+	    ffestc_local_.equiv.ok = FALSE;	/* Couldn't merge. */
+	}
+    }
 
   if (ffesymbol_is_save (s))
     ffestc_local_.equiv.save = TRUE;
diff -r -u orig/egcs-980129/gcc/f/std.c egcs-980129/gcc/f/std.c
--- orig/egcs-980129/gcc/f/std.c	Tue Aug 12 03:47:47 1997
+++ egcs-980129/gcc/f/std.c	Tue Feb  3 16:13:34 1998
@@ -1105,13 +1105,15 @@
 	   = ffestp_file.inquire.inquire_spec[ix].kw_or_val_present)
 	  && (stmt->inquire_spec[ix].value_present
 	      = ffestp_file.inquire.inquire_spec[ix].value_present))
-	if ((stmt->inquire_spec[ix].value_is_label
-	     = ffestp_file.inquire.inquire_spec[ix].value_is_label))
-	  stmt->inquire_spec[ix].u.label
-	    = ffestp_file.inquire.inquire_spec[ix].u.label;
-	else
-	  stmt->inquire_spec[ix].u.expr
-	    = ffestp_file.inquire.inquire_spec[ix].u.expr;
+	{
+	  if ((stmt->inquire_spec[ix].value_is_label
+	       = ffestp_file.inquire.inquire_spec[ix].value_is_label))
+	    stmt->inquire_spec[ix].u.label
+	      = ffestp_file.inquire.inquire_spec[ix].u.label;
+	  else
+	    stmt->inquire_spec[ix].u.expr
+	      = ffestp_file.inquire.inquire_spec[ix].u.expr;
+	}
     }
 
   return stmt;
@@ -4356,11 +4358,13 @@
 
 	case FFESTP_formattypeFORMAT:
 	  if (next->u.R1003D.R1004.present)
-	    if (next->u.R1003D.R1004.rtexpr)
-	      ffestd_R1001error_ (next);
-	    else
-	      ffests_printf_1U (s, "%lu",
-				next->u.R1003D.R1004.u.unsigned_val);
+	    {
+	      if (next->u.R1003D.R1004.rtexpr)
+		ffestd_R1001error_ (next);
+	      else
+		ffests_printf_1U (s, "%lu",
+				  next->u.R1003D.R1004.u.unsigned_val);
+	    }
 
 	  ffests_putc (s, '(');
 	  ffestd_R1001dump_ (s, next->u.R1003D.format);
@@ -4387,18 +4391,22 @@
   assert (!f->u.R1005.R1009.present);
 
   if (f->u.R1005.R1004.present)
-    if (f->u.R1005.R1004.rtexpr)
-      ffestd_R1001error_ (f);
-    else
-      ffests_printf_1U (s, "%lu", f->u.R1005.R1004.u.unsigned_val);
+    {
+      if (f->u.R1005.R1004.rtexpr)
+	ffestd_R1001error_ (f);
+      else
+	ffests_printf_1U (s, "%lu", f->u.R1005.R1004.u.unsigned_val);
+    }
 
   ffests_puts (s, string);
 
   if (f->u.R1005.R1006.present)
-    if (f->u.R1005.R1006.rtexpr)
-      ffestd_R1001error_ (f);
-    else
-      ffests_printf_1U (s, "%lu", f->u.R1005.R1006.u.unsigned_val);
+    {
+      if (f->u.R1005.R1006.rtexpr)
+	ffestd_R1001error_ (f);
+      else
+	ffests_printf_1U (s, "%lu", f->u.R1005.R1006.u.unsigned_val);
+    }
 }
 
 /* ffestd_R1001dump_1005_2_ -- Dump a particular format
@@ -4416,10 +4424,12 @@
   assert (f->u.R1005.R1006.present);
 
   if (f->u.R1005.R1004.present)
-    if (f->u.R1005.R1004.rtexpr)
-      ffestd_R1001error_ (f);
-    else
-      ffests_printf_1U (s, "%lu", f->u.R1005.R1004.u.unsigned_val);
+    {
+      if (f->u.R1005.R1004.rtexpr)
+	ffestd_R1001error_ (f);
+      else
+	ffests_printf_1U (s, "%lu", f->u.R1005.R1004.u.unsigned_val);
+    }
 
   ffests_puts (s, string);
 
@@ -4443,10 +4453,12 @@
   assert (f->u.R1005.R1006.present);
 
   if (f->u.R1005.R1004.present)
-    if (f->u.R1005.R1004.rtexpr)
-      ffestd_R1001error_ (f);
-    else
-      ffests_printf_1U (s, "%lu", f->u.R1005.R1004.u.unsigned_val);
+    {
+      if (f->u.R1005.R1004.rtexpr)
+	ffestd_R1001error_ (f);
+      else
+	ffests_printf_1U (s, "%lu", f->u.R1005.R1004.u.unsigned_val);
+    }
 
   ffests_puts (s, string);
 
@@ -4481,10 +4493,12 @@
   assert (f->u.R1005.R1006.present);
 
   if (f->u.R1005.R1004.present)
-    if (f->u.R1005.R1004.rtexpr)
-      ffestd_R1001error_ (f);
-    else
-      ffests_printf_1U (s, "%lu", f->u.R1005.R1004.u.unsigned_val);
+    {
+      if (f->u.R1005.R1004.rtexpr)
+	ffestd_R1001error_ (f);
+      else
+	ffests_printf_1U (s, "%lu", f->u.R1005.R1004.u.unsigned_val);
+    }
 
   ffests_puts (s, string);
 
@@ -4514,10 +4528,12 @@
   assert (f->u.R1005.R1006.present);
 
   if (f->u.R1005.R1004.present)
-    if (f->u.R1005.R1004.rtexpr)
-      ffestd_R1001error_ (f);
-    else
-      ffests_printf_1U (s, "%lu", f->u.R1005.R1004.u.unsigned_val);
+    {
+      if (f->u.R1005.R1004.rtexpr)
+	ffestd_R1001error_ (f);
+      else
+	ffests_printf_1U (s, "%lu", f->u.R1005.R1004.u.unsigned_val);
+    }
 
   ffests_puts (s, string);
 
@@ -4568,10 +4584,12 @@
 ffestd_R1001dump_1010_2_ (ffests s, ffesttFormatList f, char *string)
 {
   if (f->u.R1010.val.present)
-    if (f->u.R1010.val.rtexpr)
-      ffestd_R1001error_ (f);
-    else
-      ffests_printf_1U (s, "%lu", f->u.R1010.val.u.unsigned_val);
+    {
+      if (f->u.R1010.val.rtexpr)
+	ffestd_R1001error_ (f);
+      else
+	ffests_printf_1U (s, "%lu", f->u.R1010.val.u.unsigned_val);
+    }
 
   ffests_puts (s, string);
 }
diff -r -u orig/egcs-980129/gcc/f/ste.c egcs-980129/gcc/f/ste.c
--- orig/egcs-980129/gcc/f/ste.c	Mon Nov  3 01:07:04 1997
+++ egcs-980129/gcc/f/ste.c	Tue Feb  3 16:14:42 1998
@@ -2905,22 +2905,24 @@
     ffecom_push_calltemps ();
 
     if (neg == zero)
-      if (neg == pos)
-	expand_goto (gzero);
-      else
-	{			/* IF (expr.LE.0) THEN GOTO neg/zero ELSE
-				   GOTO pos. */
-	  texpr = ffecom_expr (expr);
-	  texpr = ffecom_2 (LE_EXPR, integer_type_node,
-			    texpr,
-			    convert (TREE_TYPE (texpr),
-				     integer_zero_node));
-	  expand_start_cond (ffecom_truth_value (texpr), 0);
+      {
+	if (neg == pos)
 	  expand_goto (gzero);
-	  expand_start_else ();
-	  expand_goto (gpos);
-	  expand_end_cond ();
-	}
+	else
+	  {			/* IF (expr.LE.0) THEN GOTO neg/zero ELSE
+				   GOTO pos. */
+	    texpr = ffecom_expr (expr);
+	    texpr = ffecom_2 (LE_EXPR, integer_type_node,
+			      texpr,
+			      convert (TREE_TYPE (texpr),
+				       integer_zero_node));
+	    expand_start_cond (ffecom_truth_value (texpr), 0);
+	    expand_goto (gzero);
+	    expand_start_else ();
+	    expand_goto (gpos);
+	    expand_end_cond ();
+	  }
+      }
     else if (neg == pos)
       {				/* IF (expr.NE.0) THEN GOTO neg/pos ELSE GOTO
 				   zero. */
diff -r -u orig/egcs-980129/gcc/f/sts.c egcs-980129/gcc/f/sts.c
--- orig/egcs-980129/gcc/f/sts.c	Tue Aug 12 03:47:48 1997
+++ egcs-980129/gcc/f/sts.c	Tue Feb  3 16:15:29 1998
@@ -252,19 +252,21 @@
 
   newlen = s->len_ + length;
   if (newlen > s->max_)
-    if (s->text_ == NULL)
-      {
-	s->max_ = 40;
-	s->text_ = malloc_new_ksr (s->pool_, "ffests", s->max_);
-      }
-    else
-      {
-	newmax = s->max_ << 1;
-	while (newmax < newlen)
-	  newmax <<= 1;
-	s->text_ = malloc_resize_ksr (s->pool_, s->text_, newmax, s->max_);
-	s->max_ = newmax;
-      }
+    {
+      if (s->text_ == NULL)
+	{
+	  s->max_ = 40;
+	  s->text_ = malloc_new_ksr (s->pool_, "ffests", s->max_);
+	}
+      else
+	{
+	  newmax = s->max_ << 1;
+	  while (newmax < newlen)
+	    newmax <<= 1;
+	  s->text_ = malloc_resize_ksr (s->pool_, s->text_, newmax, s->max_);
+	  s->max_ = newmax;
+	}
+    }
 
   memcpy (s->text_ + s->len_, text, length);
   s->len_ = newlen;
diff -r -u orig/egcs-980129/gcc/f/symbol.c egcs-980129/gcc/f/symbol.c
--- orig/egcs-980129/gcc/f/symbol.c	Sun Sep 14 15:35:32 1997
+++ egcs-980129/gcc/f/symbol.c	Tue Feb  3 16:15:53 1998
@@ -170,10 +170,12 @@
     }
 
   if (bad != FFEBAD)
-    if (i >= len)
-      *c = *(ffelex_token_text (t));
-    else
-      *c = *p;
+    {
+      if (i >= len)
+	*c = *(ffelex_token_text (t));
+      else
+	*c = *p;
+    }
 
   return bad;
 }
diff -r -u orig/egcs-980129/gcc/f/target.c egcs-980129/gcc/f/target.c
--- orig/egcs-980129/gcc/f/target.c	Tue Aug 12 03:47:48 1997
+++ egcs-980129/gcc/f/target.c	Tue Feb  3 16:17:20 1998
@@ -2191,13 +2191,15 @@
   dotoktxt (exponent);
 
   if (exponent_sign != NULL)
-    if (ffelex_token_type (exponent_sign) == FFELEX_typePLUS)
-      *p++ = '+';
-    else
-      {
-	assert (ffelex_token_type (exponent_sign) == FFELEX_typeMINUS);
-	*p++ = '-';
-      }
+    {
+      if (ffelex_token_type (exponent_sign) == FFELEX_typePLUS)
+	*p++ = '+';
+      else
+	{
+	  assert (ffelex_token_type (exponent_sign) == FFELEX_typeMINUS);
+	  *p++ = '-';
+	}
+    }
 
   dotoktxt (exponent_digits);
 
@@ -2275,13 +2277,15 @@
   dotoktxtexp (exponent);
 
   if (exponent_sign != NULL)
-    if (ffelex_token_type (exponent_sign) == FFELEX_typePLUS)
-      *p++ = '+';
-    else
-      {
-	assert (ffelex_token_type (exponent_sign) == FFELEX_typeMINUS);
-	*p++ = '-';
-      }
+    {
+      if (ffelex_token_type (exponent_sign) == FFELEX_typePLUS)
+	*p++ = '+';
+      else
+	{
+	  assert (ffelex_token_type (exponent_sign) == FFELEX_typeMINUS);
+	  *p++ = '-';
+	}
+    }
 
   dotoktxt (exponent_digits);
 
--
Kaveh R. Ghazi			Project Manager / Custom Development
ghazi@caip.rutgers.edu		ICon CMT Corp.

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~1998-02-17 23:59 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-02-12 20:07 egcs-980129, fixed ambiguous `else' warnings in the gcc/f/ dir Kaveh R. Ghazi
1998-02-12 20:07 ` Richard Henderson
1998-02-13  2:04   ` Jeffrey A Law
1998-02-13  2:28   ` Andreas Schwab
  -- strict thread matches above, loose matches on Subject: below --
1998-02-13 10:58 Kaveh R. Ghazi
1998-02-16  4:57 ` Bernd Schmidt
1998-02-17 23:59   ` Jeffrey A Law
1998-02-12 20:07 Kaveh R. Ghazi
1998-02-13 10:31 ` Bernd Schmidt
1998-02-11 18:20 Kaveh R. Ghazi
1998-02-12  2:36 ` Richard Henderson
1998-02-13  2:28   ` Jeffrey A Law
1998-02-13  2:04     ` Richard Henderson
1998-02-13  2:04       ` Jeffrey A Law
     [not found] ` <19980212011618.42585.cygnus.egcs@dot.cygnus.com>
1998-02-12 19:36   ` Jason Merrill
1998-02-13  2:04 ` Jeffrey A Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).