linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* any compelling reasons to use "offsetof"?
@ 2005-08-18 14:21 Robert P. J. Day
  2005-08-19  5:46 ` _z33
  2005-08-19  9:36 ` Glynn Clements
  0 siblings, 2 replies; 3+ messages in thread
From: Robert P. J. Day @ 2005-08-18 14:21 UTC (permalink / raw)
  To: C programming list


  in a legacy project i just inherited, i did a quick recursive grep
and noticed a number of invocations of "offsetof".  from experience,
i've concluded that the majority of these calls are because of sloppy
programming or laziness or just plain doing something incredibly hacky
that could be done in a more straightforward way.

  are there any really compelling reasons to need to know the offset
of a structure field?  just curious.

rday

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-08-19  9:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-18 14:21 any compelling reasons to use "offsetof"? Robert P. J. Day
2005-08-19  5:46 ` _z33
2005-08-19  9:36 ` Glynn Clements

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).