Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to compile using llvm-clang #132

Open
quantrpeter opened this issue Aug 18, 2022 · 0 comments
Open

unable to compile using llvm-clang #132

quantrpeter opened this issue Aug 18, 2022 · 0 comments

Comments

@quantrpeter
Copy link

/home/peter/workspace/xv6-riscv>~/workspace/llvm-project/install/bin/clang --version
clang version 10.0.1 (https://gitee.com/mirrors/llvm-project.git ef32c611aa214dea855364efd7ba451ec5ec3f74)
Target: riscv64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/peter/workspace/llvm-project/install/bin

kernel/proc.c:636:15: error: use of GNU 'missing =' extension in designator [-Werror,-Wgnu-designator]
  [UNUSED]    "unused",
              ^
              =
kernel/proc.c:637:15: error: use of GNU 'missing =' extension in designator [-Werror,-Wgnu-designator]
  [SLEEPING]  "sleep ",
              ^
              =
kernel/proc.c:638:15: error: use of GNU 'missing =' extension in designator [-Werror,-Wgnu-designator]
  [RUNNABLE]  "runble",
              ^
              =
kernel/proc.c:639:15: error: use of GNU 'missing =' extension in designator [-Werror,-Wgnu-designator]
  [RUNNING]   "run   ",
              ^
              =
kernel/proc.c:640:15: error: use of GNU 'missing =' extension in designator [-Werror,-Wgnu-designator]
  [ZOMBIE]    "zombie"
              ^
              =
5 errors generated.

these code has problem:

  static char *states[] = {
  [UNUSED]    "unused",
  [SLEEPING]  "sleep ",
  [RUNNABLE]  "runble",
  [RUNNING]   "run   ",
  [ZOMBIE]    "zombie"
  };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant