This is the mail archive of the gcc@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: making sizeof(void*) different from sizeof(void(*)())


On 4/29/2012 8:51 AM, Georg-Johann Lay wrote:
Peter Bigot a écrit:

The MSP430's split address space and ISA make it expensive to place
data above the 64 kB boundary, but cheap to place code there.  So I'm
looking for a way to use HImode for data pointers, but PSImode for
function pointers.  If gcc supports this, it's not obvious how.

I get partway there with FUNCTION_MODE and some hacks for the case
where the called object is a symbol, but not when it's a
pointer-to-function data object.

I don't think it's a good solution to use different pointer sizes. You will run into all sorts of trouble -- both in the application and in GCC.

Just to be clear, there is nothing in the standard that forbids the sizes being different AFAIK? I understand that both gcc and apps may make unwarranted assumptions.


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