Re: [IDEA+RFC] Possible solution for min()/max() war

Peter T. Breuer (ptb@it.uc3m.es)
Thu, 30 Aug 2001 23:32:55 +0200 (MET DST)


"David Woodhouse wrote:"
>
> ptb@it.uc3m.es said:
> > And I was hoping that somebody could produce some gcc magic
> > replacement for BUG() that means "don't compile me". Perhaps a bit of
> > illegal assembler code with a line reference in? Surely gcc must have
> > something like __builtin_wont_compile()? It just needs to be a leaf of
> > the RTL that evokes a compile error.
>
> It's done. I believe it was called __builtin_ct_assertion(). I don't think
> it got merged (yet?).

Now I think of it, I suppose

unsafe_min_or_max_at_line_##__LINE__()

will definitely evoke a meaningful link error.

I still suspect that illegal assembler will do the job, since it must
be treated after gcc has produced assembler itself and line references
must still be present then for the assembler to be able to give meaningful
error messages (;), but assembler is not something I write, so someone
else needs to say.

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