How can I return an anonymous struct in C?

前端 未结 7 655
青春惊慌失措
青春惊慌失措 2020-12-17 07:49

Trying some code, I realized that the following code compiles:

struct { int x, y; } foo(void) {
}

It se

7条回答
  •  佛祖请我去吃肉
    2020-12-17 08:38

    Or you could create infinite recursion:

    struct { int x, y; } foo(void) {
       return foo();
    }
    

    Which I think is completely legal.

提交回复
热议问题