public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [Linux-ia64] gcc warnings on truncations?
@ 2000-08-31 15:22 Ted Logan
  2000-08-31 20:16 ` Jim Wilson
  0 siblings, 1 reply; 2+ messages in thread
From: Ted Logan @ 2000-08-31 15:22 UTC (permalink / raw)
  To: linux-ia64

Is there a way to get gcc to warn (or ideally, error) on truncations to
shorter types? ie:

	int len = strlen(blah);

should warn because strlen returns a size_t, which on 64-bit platforms
is 8 bits and ints are 4. This would be a nice sanity check in our
porting effort to make sure there's no possibility of loosing data. I've
poked through the docs and nothing seemed to do it.

Ted Logan
Spatial Technology


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

end of thread, other threads:[~2000-08-31 20:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-08-31 15:22 [Linux-ia64] gcc warnings on truncations? Ted Logan
2000-08-31 20:16 ` Jim Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox