Will a void* always have the same representation as a char*?

前端 未结 2 1124
我寻月下人不归
我寻月下人不归 2020-12-20 11:01

Will a void* always have the same representation as a char* ?

Details:

I want to work with a variadic function tha

2条回答
  •  忘掉有多难
    2020-12-20 11:46

    C11, §6.2.5, ¶28 (draft N1570) says:

    A pointer to void shall have the same representation and alignment requirements as a pointer to a character type. 48) Similarly, pointers to qualified or unqualified versions of compatible types shall have the same representation and alignment requirements.

    (emphasis mine).

提交回复
热议问题