use __builtin_offsetof to implement offsetof when possible
authorRich Felker <dalias@aerifal.cx>
Wed, 5 Dec 2012 05:00:42 +0000 (00:00 -0500)
committerRich Felker <dalias@aerifal.cx>
Wed, 5 Dec 2012 05:00:42 +0000 (00:00 -0500)
commita7c1f9727a099da0d4722d4cf81056acd205158b
tree90e1c64185cab587af89001e658d039821204a0e
parentb427c822655156f17d17cd00110ff5bc22299a38
use __builtin_offsetof to implement offsetof when possible

apparently recent gcc versions have intentionally broken the
traditional definition by treating it as a non-constant expression.
the traditional definition may also be problematic for c++ programs.
include/stddef.h