Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • sac2c sac2c
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 394
    • Issues 394
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 17
    • Merge requests 17
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • sac-group
  • sac2csac2c
  • Issues
  • #2285
Closed
Open
Created Jan 30, 2022 by Sven-Bodo Scholz@sbsOwner

-check t producing cc warnings

Compiling

int main()
{
    a = Array::iota(16);

    return _sel_VxA_([0], a);
}

with sac2c -check t -noprelude on 1.3.3-MijasCosta-705-g41ed2 yields:

/Volumes/Users/sbs/Dropbox/BodoSac/scan/a.out.c:520:24: warning: code will never be executed [-Wunreachable-code]
    if (!((0 == 0))) { SAC_RuntimeErrorLine (5, "1st argument of _idx_sel_ is not a scalar!"); };
                       ^~~~~~~~~~~~~~~~~~~~
/Volumes/Users/sbs/Dropbox/BodoSac/scan/a.out.c:520:12: note: silence by adding parentheses to mark code as explicitly dead
    if (!((0 == 0))) { SAC_RuntimeErrorLine (5, "1st argument of _idx_sel_ is not a scalar!"); };
           ^
           /* DISABLES CODE */ ( )
/Volumes/Users/sbs/Dropbox/BodoSac/scan/a.out.c:453:24: warning: code will never be executed [-Wunreachable-code]
    if (!((0 == 0))) { SAC_RuntimeErrorLine (237, "Assignment with incompatible types found!"); };
                       ^~~~~~~~~~~~~~~~~~~~
/Volumes/Users/sbs/Dropbox/BodoSac/scan/a.out.c:453:12: note: silence by adding parentheses to mark code as explicitly dead
    if (!((0 == 0))) { SAC_RuntimeErrorLine (237, "Assignment with incompatible types found!"); };
           ^
           /* DISABLES CODE */ ( )
2 warnings generated.

This is not a bug but a nuisance :-)

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking