This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: why this testcase compile failed for gcc.


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]