[LLVMdev] Evaluation of offsetof() macro

Vadim Chugunov vadimcn at gmail.com
Sat Jan 3 18:01:26 PST 2015


> Do you start from offsetof() or the expanded form? For various reasons,
> it is normally defined to use __builtin_offsetof, since the problems you
> have run into also stop the "legacy" C version from being appropoiate
> for C++ as it doesn't create an ICE.
>

I start with a macro, but I was considering expanding it to pointer
arithmetic, to avoid creating special operators such as
__builtin_offsetof.   Would that be considered a bad idea?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150103/b7c5351b/attachment.html>


More information about the llvm-dev mailing list