9162 libpp: this statement may fall through

Review Request #891 — Created Feb. 21, 2018 and submitted

tsoome
illumos-gate
9162
d7659b9...
general
../common/ppcontrol.c:636:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
    if ((pp.state & STRICT) && !(pp.mode & (HOSTED|RELAX)))
       ^
../common/ppcontrol.c:640:3: note: here
   case DEFINE:
   ^~~~
../common/pplib.h:429:20: error: this statement may fall through [-Werror=implicit-fallthrough=]
    case  7 : *to++ = *fr++; \
              ~~~~~~^~~~~~
../common/ppproto.c:603:3: note: in expansion of macro 'MEMCPY'
   MEMCPY(op, ip, n);
   ^~~~~~
../common/pplib.h:430:4: note: here
    case  6 : *to++ = *fr++; \
    ^
../common/ppproto.c:603:3: note: in expansion of macro 'MEMCPY'
   MEMCPY(op, ip, n);
   ^~~~~~
../common/pplib.h:430:20: error: this statement may fall through [-Werror=implicit-fallthrough=]
    case  6 : *to++ = *fr++; \
              ~~~~~~^~~~~~
../common/ppproto.c:603:3: note: in expansion of macro 'MEMCPY'
   MEMCPY(op, ip, n);
   ^~~~~~
../common/pplib.h:431:4: note: here
    case  5 : *to++ = *fr++; \
    ^
../common/ppproto.c:603:3: note: in expansion of macro 'MEMCPY'
   MEMCPY(op, ip, n);
   ^~~~~~
../common/pplib.h:431:20: error: this statement may fall through [-Werror=implicit-fallthrough=]
    case  5 : *to++ = *fr++; \
              ~~~~~~^~~~~~
../common/ppproto.c:603:3: note: in expansion of macro 'MEMCPY'
   MEMCPY(op, ip, n);
   ^~~~~~
../common/pplib.h:432:4: note: here
    case  4 : *to++ = *fr++; \
    ^
../common/ppproto.c:603:3: note: in expansion of macro 'MEMCPY'
   MEMCPY(op, ip, n);
   ^~~~~~
../common/pplib.h:432:20: error: this statement may fall through [-Werror=implicit-fallthrough=]
    case  4 : *to++ = *fr++; \
              ~~~~~~^~~~~~
../common/ppproto.c:603:3: note: in expansion of macro 'MEMCPY'
   MEMCPY(op, ip, n);
   ^~~~~~
../common/pplib.h:433:4: note: here
    case  3 : *to++ = *fr++; \
    ^
../common/ppproto.c:603:3: note: in expansion of macro 'MEMCPY'
   MEMCPY(op, ip, n);
   ^~~~~~
../common/pplib.h:433:20: error: this statement may fall through [-Werror=implicit-fallthrough=]
    case  3 : *to++ = *fr++; \
              ~~~~~~^~~~~~
../common/ppproto.c:603:3: note: in expansion of macro 'MEMCPY'
   MEMCPY(op, ip, n);
   ^~~~~~
../common/pplib.h:434:4: note: here
    case  2 : *to++ = *fr++; \
    ^
../common/ppproto.c:603:3: note: in expansion of macro 'MEMCPY'
   MEMCPY(op, ip, n);
   ^~~~~~
../common/pplib.h:434:20: error: this statement may fall through [-Werror=implicit-fallthrough=]
    case  2 : *to++ = *fr++; \
              ~~~~~~^~~~~~
../common/ppproto.c:603:3: note: in expansion of macro 'MEMCPY'
   MEMCPY(op, ip, n);
   ^~~~~~
../common/pplib.h:435:4: note: here
    case  1 : *to++ = *fr++; \
    ^
../common/ppproto.c:603:3: note: in expansion of macro 'MEMCPY'
   MEMCPY(op, ip, n);
   ^~~~~~

../common/pplex.c: In function 'ppcpp':
../common/pplib.h:429:20: error: this statement may fall through [-Werror=implicit-fallthrough=]
    case  7 : *to++ = *fr++; \
              ~~~~~~^~~~~~
../common/pplex.c:255:3: note: in expansion of macro 'MEMCPY'
   MEMCPY(op, ip, n);
   ^~~~~~
../common/pplib.h:430:4: note: here
    case  6 : *to++ = *fr++; \
    ^
../common/pplex.c:255:3: note: in expansion of macro 'MEMCPY'
   MEMCPY(op, ip, n);
   ^~~~~~
../common/pplib.h:430:20: error: this statement may fall through [-Werror=implicit-fallthrough=]
    case  6 : *to++ = *fr++; \
              ~~~~~~^~~~~~
../common/pplex.c:255:3: note: in expansion of macro 'MEMCPY'
   MEMCPY(op, ip, n);
   ^~~~~~
../common/pplib.h:431:4: note: here
    case  5 : *to++ = *fr++; \
    ^
../common/pplex.c:255:3: note: in expansion of macro 'MEMCPY'
   MEMCPY(op, ip, n);
   ^~~~~~
../common/pplib.h:431:20: error: this statement may fall through [-Werror=implicit-fallthrough=]
    case  5 : *to++ = *fr++; \
              ~~~~~~^~~~~~
../common/pplex.c:255:3: note: in expansion of macro 'MEMCPY'
   MEMCPY(op, ip, n);
   ^~~~~~
../common/pplib.h:432:4: note: here
    case  4 : *to++ = *fr++; \
    ^
../common/pplex.c:255:3: note: in expansion of macro 'MEMCPY'
   MEMCPY(op, ip, n);
   ^~~~~~
../common/pplib.h:432:20: error: this statement may fall through [-Werror=implicit-fallthrough=]
    case  4 : *to++ = *fr++; \
              ~~~~~~^~~~~~
../common/pplex.c:255:3: note: in expansion of macro 'MEMCPY'
   MEMCPY(op, ip, n);
   ^~~~~~
../common/pplib.h:433:4: note: here
    case  3 : *to++ = *fr++; \
    ^
../common/pplex.c:255:3: note: in expansion of macro 'MEMCPY'
   MEMCPY(op, ip, n);
   ^~~~~~
../common/pplib.h:433:20: error: this statement may fall through [-Werror=implicit-fallthrough=]
    case  3 : *to++ = *fr++; \
              ~~~~~~^~~~~~
../common/pplex.c:255:3: note: in expansion of macro 'MEMCPY'
   MEMCPY(op, ip, n);
   ^~~~~~
../common/pplib.h:434:4: note: here
    case  2 : *to++ = *fr++; \
    ^
../common/pplex.c:255:3: note: in expansion of macro 'MEMCPY'
   MEMCPY(op, ip, n);
   ^~~~~~
../common/pplib.h:434:20: error: this statement may fall through [-Werror=implicit-fallthrough=]
    case  2 : *to++ = *fr++; \
              ~~~~~~^~~~~~
../common/pplex.c:255:3: note: in expansion of macro 'MEMCPY'
   MEMCPY(op, ip, n);
   ^~~~~~
../common/pplib.h:435:4: note: here
    case  1 : *to++ = *fr++; \
    ^
../common/pplex.c:255:3: note: in expansion of macro 'MEMCPY'
   MEMCPY(op, ip, n);
   ^~~~~~
In file included from ../common/ppcpp.c:30:0:
../common/pplex.c:1209:9: error: this statement may fall through [-Werror=implicit-fallthrough=]
      if (st & STRICT) error(1, "%c: invalid character in octal character escape", c);
         ^
../common/pplex.c:1212:5: note: here
     case '0':
     ^~~~
../common/pplex.c:1184:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
    if (st & STRICT) error(1, "%c: invalid character in octal character escape", c);
       ^
../common/pplex.c:1187:3: note: here
   case '0':
   ^~~~
In file included from ../common/pplex.c:30:0,
                 from ../common/ppcpp.c:30:
../common/pplib.h:429:20: error: this statement may fall through [-Werror=implicit-fallthrough=]
    case  7 : *to++ = *fr++; \
              ~~~~~~^~~~~~
../common/pplex.c:1362:8: note: in expansion of macro 'MEMCPY'
        MEMCPY(op, ip, n);
        ^~~~~~
../common/pplib.h:430:4: note: here
    case  6 : *to++ = *fr++; \
    ^
../common/pplex.c:1362:8: note: in expansion of macro 'MEMCPY'
        MEMCPY(op, ip, n);
        ^~~~~~
../common/pplib.h:430:20: error: this statement may fall through [-Werror=implicit-fallthrough=]
    case  6 : *to++ = *fr++; \
              ~~~~~~^~~~~~
../common/pplex.c:1362:8: note: in expansion of macro 'MEMCPY'
        MEMCPY(op, ip, n);
        ^~~~~~
../common/pplib.h:431:4: note: here
    case  5 : *to++ = *fr++; \
    ^
../common/pplex.c:1362:8: note: in expansion of macro 'MEMCPY'
        MEMCPY(op, ip, n);
        ^~~~~~
../common/pplib.h:431:20: error: this statement may fall through [-Werror=implicit-fallthrough=]
    case  5 : *to++ = *fr++; \
              ~~~~~~^~~~~~
../common/pplex.c:1362:8: note: in expansion of macro 'MEMCPY'
        MEMCPY(op, ip, n);
        ^~~~~~
../common/pplib.h:432:4: note: here
    case  4 : *to++ = *fr++; \
    ^
../common/pplex.c:1362:8: note: in expansion of macro 'MEMCPY'
        MEMCPY(op, ip, n);
        ^~~~~~
../common/pplib.h:432:20: error: this statement may fall through [-Werror=implicit-fallthrough=]
    case  4 : *to++ = *fr++; \
              ~~~~~~^~~~~~
../common/pplex.c:1362:8: note: in expansion of macro 'MEMCPY'
        MEMCPY(op, ip, n);
        ^~~~~~
../common/pplib.h:433:4: note: here
    case  3 : *to++ = *fr++; \
    ^
../common/pplex.c:1362:8: note: in expansion of macro 'MEMCPY'
        MEMCPY(op, ip, n);
        ^~~~~~
../common/pplib.h:433:20: error: this statement may fall through [-Werror=implicit-fallthrough=]
    case  3 : *to++ = *fr++; \
              ~~~~~~^~~~~~
../common/pplex.c:1362:8: note: in expansion of macro 'MEMCPY'
        MEMCPY(op, ip, n);
        ^~~~~~
../common/pplib.h:434:4: note: here
    case  2 : *to++ = *fr++; \
    ^
../common/pplex.c:1362:8: note: in expansion of macro 'MEMCPY'
        MEMCPY(op, ip, n);
        ^~~~~~
../common/pplib.h:434:20: error: this statement may fall through [-Werror=implicit-fallthrough=]
    case  2 : *to++ = *fr++; \
              ~~~~~~^~~~~~
../common/pplex.c:1362:8: note: in expansion of macro 'MEMCPY'
        MEMCPY(op, ip, n);
        ^~~~~~
../common/pplib.h:435:4: note: here
    case  1 : *to++ = *fr++; \
    ^
../common/pplex.c:1362:8: note: in expansion of macro 'MEMCPY'
        MEMCPY(op, ip, n);
        ^~~~~~
../common/pplex.c: In function 'pool':
../common/pplib.h:445:16: error: this statement may fall through [-Werror=implicit-fallthrough=]
 #define error  pperror
../common/pplex.c:2417:4: note: in expansion of macro 'error'
    error(ERROR_SYSTEM|3, "cannot fork pool");
    ^~~~~
In file included from ../common/ppcpp.c:30:0:
../common/pplex.c:2418:3: note: here
   case 0:
   ^~~~
cc1: all warnings being treated as errors


seeemef@mac.com
  1. 
      
  2. usr/src/lib/libpp/common/ppcontrol.c (Diff revision 1)
     
     

    Does this mean that gcc7's detection is buggy? The former seemed fine to me, and likewise with e.g. http://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libpp/common/pplex.c?r=34f9b3ee#1185

  3. 
      
citrus
  1. Ship It!
  2. 
      
tsoome
Review request changed

Status: Closed (submitted)

Loading...