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

Mark Zealey (mark@itsolve.co.uk)
Thu, 30 Aug 2001 23:14:02 +0100


On Fri, Aug 31, 2001 at 12:06:22AM +0200, Peter T. Breuer wrote:

> #define LINE(x,y) x##y
> ...
> LINE(unsafe_min_or_max_at_line_,__LINE__)()

Hmm, that doesn't work here, but I think the asm one would work better anyway.

> #define stringify(x) #x
> asm(".unsafe_use_of_min_or_max_at_line_" stringify(__LINE__))

Yep, I missed this. The following will work:

#define _S(x) #x
#define S(x) x
asm(".error_with_min_or_max_at_line_" S(__LINE__))

-- 

Mark Zealey mark@itsolve.co.uk

UL++++>$ G!>(GCM/GCS/GS/GM) dpu? s:-@ a16! C++++>$ P++++>+++++$ L+++>+++++$ !E---? W+++>$ N- !o? !w--- O? !M? !V? !PS !PE--@ PGP+? r++ !t---?@ !X---? !R- b+ !tv b+ DI+ D+? G+++ e>+++++ !h++* r!-- y--

(www.geekcode.com) - 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/