Comment

Comment by chriszhang

Can you explain "goto a function name" further?

I wrote this:

  #include <stdio.h>

  void f() {
      printf("f");
  }

  int main() {
      goto f;
      return 0;
  }
It creates error:

  foo.c:8:10: error: use of undeclared label 'f'
      goto f;
           ^
  1 error generated.
How can we goto a function name?
parent chriszhang 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton