On Fri, Aug 03, 2007 at 12:51:16AM +0200, Guennadi Liakhovetski wrote:
So gcc does that kind of recovery, after having warned you. Makes sense,
as long as it's for ordinary variables (and not, say it, struct fields) -
you get less likely runtime breakage on the undefined behaviour (e.g.
passing c to string functions). So gcc has generated some padding between
the global variables, that's all.
It doesn't change the fact that use of c[4] or strlen(c) or strcpy(..., c)
means nasal demon country for you.
Now, if gcc does that for similar situation with struct fields, you'd have
a cause to complain.
-