Project

General

Profile

Actions

Bug #12882

closed

sun4u/unix: build errors with gcc 7

Added by Toomas Soome almost 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
kernel
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Build errors on SPARC with gcc 7:

    ../../sun4/os/trap.c: In function 'trap':
    ../../sun4/os/trap.c:360:4: error: this statement may fall through [-Werror=implicit-fallthrough=]
        (void) die(type, rp, addr, mmu_fsr);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../../sun4/os/trap.c:363:3: note: here
       case FT_PRIV:
       ^~~~
    ../../sun4/os/trap.c:383:4: error: this statement may fall through [-Werror=implicit-fallthrough=]
        (void) die(type, rp, addr, mmu_fsr);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../../sun4/os/trap.c:386:3: note: here
       default:
       ^~~~~~~
    ../../sun4/os/trap.c:771:47: error: this statement may fall through [-Werror=implicit-fallthrough=]
        if ((IS_SWAP(instr) && swap_nc(rp, instr)) ||
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
            (IS_LDSTUB(instr) && ldstub_nc(rp, instr))) {
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../../sun4/os/trap.c:779:3: note: here
       case FT_PRIV:
       ^~~~
    ../../sun4/os/trap.c:304:3: error: this statement may fall through [-Werror=implicit-fallthrough=]
       (void) die(type, rp, addr, 0);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../../sun4/os/trap.c:307:2: note: here
      case T_ALIGNMENT: /* supv alignment error */
      ^~~~
    ../../sun4/os/trap.c:321:3: error: this statement may fall through [-Werror=implicit-fallthrough=]
       (void) die(type, rp, addr, 0);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../../sun4/os/trap.c:324:2: note: here
      case T_INSTR_EXCEPTION:  /* sys instruction access exception */
      ^~~~
    ../../sun4/os/trap.c:326:3: error: this statement may fall through [-Werror=implicit-fallthrough=]
       (void) die(type, rp, addr, mmu_fsr);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../../sun4/os/trap.c:329:2: note: here
      case T_INSTR_MMU_MISS:  /* sys instruction mmu miss */
      ^~~~
    ../../sun4/os/trap.c:331:3: error: this statement may fall through [-Werror=implicit-fallthrough=]
       (void) die(type, rp, addr, 0);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../../sun4/os/trap.c:334:2: note: here
      case T_DATA_EXCEPTION:  /* system data access exception */
      ^~~~
    ../../sun4/os/trap.c:924:3: error: this statement may fall through [-Werror=implicit-fallthrough=]
       (void) die(type, rp, addr, 0);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../../sun4/os/trap.c:927:2: note: here
      case T_UNIMP_INSTR + T_USER: /* illegal instruction fault */
      ^~~~
    ../../sun4/os/trap.c:1061:3: error: this statement may fall through [-Werror=implicit-fallthrough=]
       (void) die(type, rp, addr, 0);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../../sun4/os/trap.c:1064:2: note: here
      case T_IDIV0 + T_USER:  /* integer divide by zero */
      ^~~~

    ../../sparc/fs/proc/prmachdep.c: In function 'prgetprregs':
    ../../sparc/fs/proc/prmachdep.c:100:20: error: 'sizeof' on array function parameter 'prp' will return size of 'prgreg_t * {aka long int *}' [-Werror=sizeof-array-argument]
      bzero(prp, sizeof (prp));
                        ^
    ../../sparc/fs/proc/prmachdep.c:93:38: note: declared here
     prgetprregs(klwp_t *lwp, prgregset_t prp)
                                          ^~~
    ../../sparc/fs/proc/prmachdep.c: In function 'prgetprregs32':
    ../../sparc/fs/proc/prmachdep.c:321:20: error: 'sizeof' on array function parameter 'prp' will return size of 'prgreg32_t * {aka int *}' [-Werror=sizeof-array-argument]
      bzero(prp, sizeof (prp));
                        ^
    ../../sparc/fs/proc/prmachdep.c:312:42: note: declared here
     prgetprregs32(klwp_t *lwp, prgregset32_t prp)
                                              ^~~

    In file included from ../../common/vm/vm_pagelist.c:59:0:
    ../../common/vm/vm_pagelist.c: In function 'page_ctr_sub_internal':
    ../../sun4/vm/vm_dep.h:419:19: error: left shift of negative value [-Werror=shift-negative-value]
      long cnt = ((-1) << PAGE_BSZS_SHIFT(szc));   \
                       ^
    ../../common/vm/vm_pagelist.c:879:2: note: in expansion of macro 'PLCNT_DECR'
      PLCNT_DECR(pp, mnode, mtype, pp->p_szc, flags);
      ^~~~~~~~~~
    ../../common/vm/vm_pagelist.c: In function 'page_get_freelist':
    ../../sun4/vm/vm_dep.h:630:3: error: this statement may fall through [-Werror=implicit-fallthrough=]
       cmn_err(CE_WARN,     \
       ^~~~~~~~~~~~~~~~~~~~~~
        "AS_2_BIN: bad consistent coloring value"); \
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../../common/vm/vm_pagelist.c:3785:2: note: in expansion of macro 'AS_2_BIN'
      AS_2_BIN(as, seg, vp, vaddr, bin, szc);
      ^~~~~~~~
    ../../sun4/vm/vm_dep.h:633:2: note: here
      case 0: {                                                       \
      ^
    ../../common/vm/vm_pagelist.c:3785:2: note: in expansion of macro 'AS_2_BIN'
      AS_2_BIN(as, seg, vp, vaddr, bin, szc);
      ^~~~~~~~
    ../../common/vm/vm_pagelist.c: In function 'page_get_cachelist':
    ../../sun4/vm/vm_dep.h:630:3: error: this statement may fall through [-Werror=implicit-fallthrough=]
       cmn_err(CE_WARN,     \
       ^~~~~~~~~~~~~~~~~~~~~~
        "AS_2_BIN: bad consistent coloring value"); \
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../../common/vm/vm_pagelist.c:3919:2: note: in expansion of macro 'AS_2_BIN'
      AS_2_BIN(as, seg, vp, vaddr, bin, 0);
      ^~~~~~~~
    ../../sun4/vm/vm_dep.h:633:2: note: here
      case 0: {                                                       \
      ^
    ../../common/vm/vm_pagelist.c:3919:2: note: in expansion of macro 'AS_2_BIN'
      AS_2_BIN(as, seg, vp, vaddr, bin, 0);
      ^~~~~~~~
    cc1: all warnings being treated as errors

Testing done: build/install/boot

Actions #1

Updated by Toomas Soome almost 2 years ago

  • Description updated (diff)
  • Gerrit CR set to 743
Actions #2

Updated by Electric Monk almost 2 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

git commit 4cf53d5010eff4a394b33676d54b1311b8e1012e

commit  4cf53d5010eff4a394b33676d54b1311b8e1012e
Author: Toomas Soome <tsoome@me.com>
Date:   2020-07-10T19:22:51.000Z

    12882 sun4u/unix: build errors with gcc 7
    Reviewed by: Igor Kozhukhov <igor@dilos.org>
    Reviewed by: Andy Fiddaman <andy@omniosce.org>
    Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF