This is the mail archive of the 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 30/04/12 13:01, Peter Bigot wrote:
I would like to see the technical details, if your code is released somewhere.

Hi Peter,

Sorry for the delay.
The code is not released, however I can send you a patch against GCC 4.6.3 sources (our GCC 4.7.0 port is not yet stable) of our changes and will also try to explain how it works.

Without having started it yet, I'm thinking this can be done by
modifying build_pointer_type to generalize the
the whole type instead of just the address space field, and moving
TARGET_ADDR_SPACE_POINTER_MODE support to the default implementation
for that hook. Likewise for build_reference_type.  Then judicious
application of attributes to types and decls would allow detection of
the situation where a non-standard pointer size is needed.  I'm hoping
there aren't too many other places where that work would get undone.

As you will see, I haven't used anything related to address spaces feature in GCC.

Sounds like a useful set of changes to have in the main sources, since this is hardly a singular need!

Yes. Is there an existing bug/enhancement report for this capability?

Don't think so but I would be happy to contribute with whatever I can.

-- PMatos

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