lkml.org 
[lkml]   [2001]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [IDEA+RFC] Possible solution for min()/max() war
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/

\
 
 \ /
  Last update: 2005-03-22 13:01    [W:0.267 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site