Hello, On 10/12/2015 01:19 PM, Bernd Schmidt wrote: > On 10/12/2015 12:56 PM, Christian Bruel wrote: >> yes I see, I was hoping to avoid a new hook, but as you said it seems >> mandatory for the mere declaration case. >> >> Here is one proposal, it defaults to nothing and the ARM implementation >> does not need to handle the vptr bit setting. so that simplifies a lot >> the things. >> >> The hook is called from rest_of_decl_compilation for mere declarations >> and allocate_struct_function for definitions. > > This looks good to me. I still think we also want your vptr patch. > > Bernd > Here is the "vptr patch". 2 changes to watch for the review : - I replaced the DECL_ALIGN checks by FUNCTION_BOUNDARY because there is no user align at that time of processing and it's consistent with the default TARGET_PTRMEMFUNC_VBIT_LOCATION macro implementation (or TARGET_PTRMEMFUNC_VBIT_LOCATION should also be function of DECL_ALIGN) - The second chunk from cp/lambda.c did not seem to be needed (?). Thunks are FUNCTION_TYPE and I don't see why they would need to carry the vptr bit information (for METHOD_TYPE from my understanding). Or did I miss something here ? bootstrapped on x86. no c/c++ new failures for x86 (ptrmemfunc_vbit_in_pfn, align 8) arm (ptrmemfunc_vbit_in_delta, align 16 or 32) sh4 (ptrmemfunc_vbit_in_pfn, align 16) It's a code cleanup/refactoring. No new testcase. thanks