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 393
    • Issues 393
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 24
    • Merge requests 24
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • sac-group
  • sac2csac2c
  • Issues
  • #2306
Closed
Open
Created Feb 27, 2022 by Sven-Bodo Scholz@sbsOwner

parser and modules seems broken

I try this

use StdIO: all;

noinline
Termfile::Termfile foo( Termfile::Termfile f)
{
    fprintf ( f, "hello\n");
    return f;
}

int main()
{
   TermFile::stdin = foo( TermFile::stdin);
   return 0;
}

on

-sbs-Bodos-IMac-> sac2c-d -V
sac2c 1.3.3-MijasCosta-778-gd0f9f
build-type: DEBUG
built-by: "sbs" at 2022-02-27T18:09:33

and I get

sac2c-d simple.sac
**  1: Loading SAC program ...
./simple.sac:4:11: error:
=> cannot load module `Termfile'!
./simple.sac:4:1: error:
=> type expected, `Termfile' found
./simple.sac:15:1: error:
=> function body or semicolon expected
abort: Failed to construct a syntax tree for `simple.sac'
compilation failed while Loading SAC program, 3 error(s).

I guess the problem is that StdIO already brings Termfile..... but that error message does not make any sense, does it?

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