This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

Re: Implement -Wimplicit-fallthrough (take 2): fix missing breaks


On Jul 27, 2016, at 9:52 AM, Marek Polacek <polacek@redhat.com> wrote:
> 
> This is what the new warning pointed out.  I think all these are bugs.
> 
> --- gcc/libgo/runtime/heapdump.c
> +++ gcc/libgo/runtime/heapdump.c
> @@ -766,6 +766,7 @@ dumpefacetypes(void *obj __attribute__ ((unused)), uintptr size, const Type *typ
> 		for(i = 0; i <= size - type->__size; i += type->__size)
> 			//playgcprog(i, (uintptr*)type->gc + 1, dumpeface_callback, obj);
> 		break;
> +		break;
> 	case TypeInfo_Chan:
> 		if(type->__size == 0) // channels may have zero-sized objects in them
> 			break;

I disagree that's the best fix.  Better would be to uncomment out the playgcprog calls, and #if 0 the entire contents of the function.

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