10/12/03 10:15:43
>>279
C99の規格票で済まないがこんな項目がある
26 A pointer to void shall have the same representation and alignment requirements as a
pointer to a character type.39) Similarly, pointers to qualified or unqualified versions of
compatible types shall have the same representation and alignment requirements. All
pointers to structure types shall have the same representation and alignment requirements
as each other. All pointers to union types shall have the same representation and
alignment requirements as each other. Pointers to other types need not have the same
representation or alignment requirements.
この規格票から見れば、void * に対する演算は、char * に対する演算と等価だと言っている。
だからBCCがおかしいと言えない事もない。
ちなみにgcc 4.5.1に-ansiを付けてコンパイルしてもコンパイルは通る
gccが正しいのなら、BCCが規格通りではない(C89はどうだが知らないが)という事になる