[Bug c/77886] -Wimplicit-fallthrough: breaks duff's device
marc.mutz at kdab dot com
gcc-bugzilla@gcc.gnu.org
Thu Oct 6 20:26:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77886
--- Comment #3 from Marc Mutz <marc.mutz at kdab dot com> ---
Here's another example of a switch where I can't silence the warning, except by
C++11 attribute:
switch (i & 7) {
case 7: blender.write(line, reinterpret_cast<const SrcT
*>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u
+= dudx; v += dvdx; ++line;
case 6: blender.write(line, reinterpret_cast<const SrcT
*>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u
+= dudx; v += dvdx; ++line;
case 5: blender.write(line, reinterpret_cast<const SrcT
*>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u
+= dudx; v += dvdx; ++line;
case 4: blender.write(line, reinterpret_cast<const SrcT
*>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u
+= dudx; v += dvdx; ++line;
case 3: blender.write(line, reinterpret_cast<const SrcT
*>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u
+= dudx; v += dvdx; ++line;
case 2: blender.write(line, reinterpret_cast<const SrcT
*>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u
+= dudx; v += dvdx; ++line;
case 1: blender.write(line, reinterpret_cast<const SrcT
*>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u
+= dudx; v += dvdx; ++line;
}
More information about the Gcc-bugs
mailing list