]> git.hungrycats.org Git - linux/commit
[PATCH] GCC 3.3.x/3.4 compatiblity fix in include/linux/init.h
authorBernardo Innocenti <bernie@develer.com>
Fri, 26 Sep 2003 10:58:02 +0000 (03:58 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Fri, 26 Sep 2003 10:58:02 +0000 (03:58 -0700)
commite28f8379df4d4b917545c5d34fd77f947d95e390
treea98939a879b8cd7f29cc15139f68c6167fa9b104
parenta888efe74b39de60f40a8ebf9034dce087f4c783
[PATCH] GCC 3.3.x/3.4 compatiblity fix in include/linux/init.h

GCC 3.4 miscompiles the kernel because it silently optimizes away
data placed in the .init.setup section by the __setup() macro.

__attribute__((unused)) does only avoid the warning, but doesn't
mark the data as being used.

Since GCC 3.3, __attribute__((used)) should be applied to such
variables.  The __attribute_used__ macro from linux/compiler.h already
takes care of compiler differences for us.

In this patch, I've gone a step further and proactively fixed that in
all places.
include/linux/init.h