Skip to content

[BUG] - Array of strings #158

@Jamesbarford

Description

@Jamesbarford

Describe the bug
The following does not work as intended:

Example Program

U0 Main()
{
  U8 s[][8] = {"hello", "world"};
  "%s\n", s[0]; // will not print hello but do something weird
}

The assembly is very different from what gcc or clang would produce when doing:

#include <stdio.h>

int main(void) {
    char s[][8] = {"hello", "world"};
    printf("%s\n", s[0]); // will print hello
}

Expected behavior
This should print hello

Compiler version
v0.0.8

Commit Hash
ae4fcf9

Desktop (please complete the following information):

  • all

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions