Files
tegra-linux-noble/include/linux
David Daney 1399ff86f2 kernel.h: add BUILD_BUG() macro
We can place this in definitions that we expect the compiler to remove by
dead code elimination.  If this assertion fails, we get a nice error
message at build time.

The GCC function attribute error("message") was added in version 4.3, so
we define a new macro __linktime_error(message) to expand to this for
GCC-4.3 and later.  This will give us an error diagnostic from the
compiler on the line that fails.  For other compilers
__linktime_error(message) expands to nothing, and we have to be content
with a link time error, but at least we will still get a build error.

BUILD_BUG() expands to the undefined function __build_bug_failed() and
will fail at link time if the compiler ever emits code for it.  On GCC-4.3
and later, attribute((error())) is used so that the failure will be noted
at compile time instead.

Signed-off-by: David Daney <david.daney@cavium.com>
Acked-by: David Rientjes <rientjes@google.com>
Cc: DM <dm.n9107@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-10 16:30:42 -08:00
..
2011-12-11 18:25:16 -05:00
2011-12-13 15:30:49 -05:00
2012-01-04 15:52:42 -08:00
2012-01-03 22:55:17 -05:00
2012-01-10 16:30:42 -08:00
2012-01-03 22:54:57 -05:00
2012-01-09 19:23:45 -05:00
2011-11-26 14:59:39 -05:00
2011-12-11 18:25:16 -05:00
2012-01-03 22:54:58 -05:00
2012-01-03 22:54:56 -05:00
2012-01-03 22:55:17 -05:00
2011-12-11 18:25:16 -05:00
2012-01-09 13:52:09 +01:00
2012-01-10 16:30:42 -08:00
2011-12-14 11:19:07 -08:00
2012-01-03 22:55:15 -05:00
2011-12-08 10:22:09 -08:00
2012-01-10 16:30:41 -08:00
2012-01-05 14:01:21 -05:00
2012-01-03 22:54:56 -05:00
2012-01-03 22:55:07 -05:00
2012-01-03 22:54:56 -05:00
2012-01-03 22:52:40 -05:00
2011-11-29 11:59:50 +00:00
2012-01-03 22:54:56 -05:00