why this testcase compile failed for gcc.

Jonathan Wakely jwakely.gcc@gmail.com
Tue Feb 22 19:18:00 GMT 2011


On 22 February 2011 18:45, Andi Hellmund wrote:
> Hey
>>
>> The C standard does not require that a function pointer use the same
>> representation as any other type of pointer.  In particular, on
>> processors with Harvard architectures, function pointers and regular
>> pointers are inherently different.
>>
>
> @Ian: do you have a reference section where this is described. I shortly
> tried to search for a few keywords in the standard, but couldn't find the
> obvious. I would just be interested in the details ...

6.2.5 paragraph 26 covers representation.

6.3.2.3 paragraphs 1, 7 and 8 cover allowed conversions between
pointer types. A pointer to function type cannot be converted to a
pointer to object or incomplete type.



More information about the Gcc-help mailing list