what is typeof((c) + 1) in C

后端 未结 7 2037
梦谈多话
梦谈多话 2020-12-23 14:09

I came across an expression in C like

typeof((c) + 1) _tmp = c;

What exactly does this mean?

Thanks for the reply.

Just on

7条回答
  •  生来不讨喜
    2020-12-23 14:30

    It is not standard C. C has no such thing as typeof (unless you are dealing with something user-defined).

    typeof is normally a compiler extension (GCC compiler most likely). You can read about it here

    http://gcc.gnu.org/onlinedocs/gcc/Typeof.html

提交回复
热议问题