Re: Fix missing FALLTHRU comments

2016-09-30 Thread Marek Polacek
On Fri, Sep 30, 2016 at 06:49:17PM +0200, Jan-Benedict Glaw wrote:
> On Thu, 2016-09-29 18:01:46 +0200, Marek Polacek  wrote:
> > My upcoming fix revealed more places that were missing a fall through 
> > marker.
> > 
> > Bootstrapped/regtested on x86_64-linux, ppc64-linux, and aarch64-linux-gnu 
> > with
> > my fix, applying to trunk.
> > 
> > 2016-09-29  Marek Polacek  
> > 
> > * rtti.c (involves_incomplete_p): Add fall through comment.
> > 
> > * dwarf2out.c (loc_descriptor): Add fall through comment.
> > (add_const_value_attribute): Likewise.
> 
> Maybe gcc/config/alpha/predicates.md:184, too?
> 
> /* ... fall through ...  */
> 
> This showed up on my build robot recently.

Thanks, fixed:

2016-09-30  Marek Polacek  

* config/alpha/predicates.md: Adjust fall through comment.

diff --git gcc/config/alpha/predicates.md gcc/config/alpha/predicates.md
index 24fa3c2..ca14fad 100644
--- gcc/config/alpha/predicates.md
+++ gcc/config/alpha/predicates.md
@@ -181,7 +181,7 @@
 case SUBREG:
   if (register_operand (op, mode))
return 1;
-  /* ... fall through ...  */
+  /* fall through */
 case MEM:
   return ((TARGET_BWX || (mode != HImode && mode != QImode))
  && general_operand (op, mode));


Marek


Re: Fix missing FALLTHRU comments

2016-09-30 Thread Jan-Benedict Glaw
On Thu, 2016-09-29 18:01:46 +0200, Marek Polacek  wrote:
> My upcoming fix revealed more places that were missing a fall through marker.
> 
> Bootstrapped/regtested on x86_64-linux, ppc64-linux, and aarch64-linux-gnu 
> with
> my fix, applying to trunk.
> 
> 2016-09-29  Marek Polacek  
> 
>   * rtti.c (involves_incomplete_p): Add fall through comment.
> 
>   * dwarf2out.c (loc_descriptor): Add fall through comment.
>   (add_const_value_attribute): Likewise.

Maybe gcc/config/alpha/predicates.md:184, too?

/* ... fall through ...  */

This showed up on my build robot recently.

MfG, JBG

-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
Signature of: Friends are relatives you make for yourself.
the second  :


signature.asc
Description: Digital signature


Fix missing FALLTHRU comments

2016-09-29 Thread Marek Polacek
My upcoming fix revealed more places that were missing a fall through marker.

Bootstrapped/regtested on x86_64-linux, ppc64-linux, and aarch64-linux-gnu with
my fix, applying to trunk.

2016-09-29  Marek Polacek  

* rtti.c (involves_incomplete_p): Add fall through comment.

* dwarf2out.c (loc_descriptor): Add fall through comment.
(add_const_value_attribute): Likewise.

diff --git gcc/cp/rtti.c gcc/cp/rtti.c
index 75aeb0b..a882761 100644
--- gcc/cp/rtti.c
+++ gcc/cp/rtti.c
@@ -855,7 +855,7 @@ involves_incomplete_p (tree type)
 case UNION_TYPE:
   if (!COMPLETE_TYPE_P (type))
return true;
-
+  /* Fall through.  */
 default:
   /* All other types do not involve incomplete class types.  */
   return false;
diff --git gcc/dwarf2out.c gcc/dwarf2out.c
index 972da16..90e68e2 100644
--- gcc/dwarf2out.c
+++ gcc/dwarf2out.c
@@ -14554,6 +14554,7 @@ loc_descriptor (rtx rtl, machine_mode mode,
 case SYMBOL_REF:
   if (!const_ok_for_output (rtl))
break;
+  /* FALLTHROUGH */
 case LABEL_REF:
   if (mode != VOIDmode && GET_MODE_SIZE (mode) == DWARF2_ADDR_SIZE
  && (dwarf_version >= 4 || !dwarf_strict))
@@ -17201,6 +17202,7 @@ add_const_value_attribute (dw_die_ref die, rtx rtl)
 case SYMBOL_REF:
   if (!const_ok_for_output (rtl))
return false;
+  /* FALLTHROUGH */
 case LABEL_REF:
   if (dwarf_version >= 4 || !dwarf_strict)
goto rtl_addr;

Marek