yaxunl added a comment. In http://reviews.llvm.org/D19932#465781, @jvesely wrote:
> In http://reviews.llvm.org/D19932#465763, @cfe-commits wrote: > > > The returned pointer should point to the same pointee type as the argument. > > Header file cannot guarantee that. > > > > Sam > > > how come? is there a possibility to have two different types using the same > name? Because the pointee type is arbitrary, you can only define it as global void* to_global(void*); in the header file. Then you could have int *a; global double *b = to_global(a); without diagnostics, but the spec requires that to_global(a) should have global int* type, therefore there should be some diagnostics. Repository: rL LLVM http://reviews.llvm.org/D19932 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits