Hi,

Sean has left the following comment at Fix Mac OS X compilation errors under Buildbot http://www.google-melange.com/gci/task/view/google/gci2012/8081208:


compiles, but...


That's not a safe change. The bu_offsetof() macro intentionally leverages a compiler built-in offsetof() macro/function. The version you left assumes that if a given structure were allocated at memory address 0, the offset into the array is fixed. In practice, that may work, but I'm not sure that's something the standard actually guarantees. Using offsetof() when it's available is more correct. The (long) return type case does look wrong, though (should be size_t).

Expanding the BU_LIST_MAIN_PTR() does look better, though that should also be using our bu_offsetof() wrapper.


Greetings,
The Google Open Source Programs Team


---
You are receiving this message because you are subscribed to Fix Mac OS X compilation errors under Buildbot. To stop receiving these messages, go to: http://www.google-melange.com/gci/task/view/google/gci2012/8081208.

------------------------------------------------------------------------------
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
_______________________________________________
BRL-CAD Tracker mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-tracker

Reply via email to