Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • vala vala
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 770
    • Issues 770
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 73
    • Merge requests 73
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOMEGNOME
  • valavala
  • Issues
  • #1013
Closed
Open
Issue created Jun 17, 2020 by aeldemery@aeldemery

Invalid c-code with nested struct initializer

I have a struct of structures which I can't initialize it this way

struct Foo {
	int i;
}

struct Bar {
	Foo a;
	Foo b;
}

void main () {
	Bar bar = { { 23 }, { 42 } };
}
test.vala.c: In function ‘_vala_main’:
test.vala.c:106:13: error: expected expression before ‘{’ token
  106 |  _tmp0_.a = {23};
      |             ^
test.vala.c:107:13: error: expected expression before ‘{’ token
  107 |  _tmp0_.b = {42};
      |             ^
error: cc exited with status 256
Edited Jun 17, 2020 by Rico Tzschichholz
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking