在这篇后记中,笔者将对三个问题进行补充:
一、关于数组名取地址的问题。c89、c99允许对数组名取地址,是由于数组符合一个对象的定义,按照一
个对象的语义,对其取地址是合理的。但矛盾在于,数组名是一个符号地址,是一个右值,对其取地址不
符合&运算符的语法。c89、c99委员会经过权衡,认为维护一个对象的合理性比一个运算符更重要、更合
理,因此允许对数组名取地址。但是,&a的意义,已经不是对一个数组名取地址,而是对一个数组对象取
地址,因此,&a所代表的地址值才跟a地址值一样,同时sizeof(&a)应该等于sizeof(a)。c89、c99对这个
观点是这样阐述的:
Some implementations have not allowed the & operator to be applied to an array or a function.(The construct was permitted in early versions of C, then later made optional.) The C89 Committee endorsed the construct since it is unambiguous, and since data abstraction is enhanced by allowing the important & operator to apply uniformly to any addressable entity.
二、对于二级const指针间的赋值,笔者曾经在第九章举了一个例子,以说明二级const指针间的赋值会导
致一个常