Re: [PATCH v3 0/2] Stop some of the abuse of BUG() where compile time checks should be used.

From: David Howells
Date: Thu Nov 24 2011 - 05:25:16 EST


David Daney <ddaney.cavm@xxxxxxxxx> wrote:

> We thought about doing that, but without doing some complex preprocessor fu,
> the GCC attribute ((error())) thing doesn't do what we want.
>
> It appears that if more than a single instance of the construct is used in a
> compilation unit, the string emitted by the compiler for any of the violations
> will be the last string encountered.

Have you tried asking the gcc folks if this is likely to get fixed soon?

David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/