[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c62985530903100848x45d65e02u61dbf6b972f9b840@mail.gmail.com>
Date: Tue, 10 Mar 2009 16:48:34 +0100
From: Frédéric Weisbecker <fweisbec@...il.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Steven Rostedt <rostedt@...dmis.org>, linux-kernel@...r.kernel.org,
Ingo Molnar <mingo@...e.hu>,
Andrew Morton <akpm@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Theodore Tso <tytso@....edu>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>,
Mathieu Desnoyers <compudj@...stal.dyndns.org>,
Lai Jiangshan <laijs@...fujitsu.com>,
"Martin J. Bligh" <mbligh@...igh.org>,
"Frank Ch. Eigler" <fche@...hat.com>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
Larry Woodman <lwoodman@...hat.com>,
Jason Baron <jbaron@...hat.com>,
Tom Zanussi <tzanussi@...il.com>,
Masami Hiramatsu <mhiramat@...hat.com>,
Christoph Hellwig <hch@...radead.org>,
Jiaying Zhang <jiayingz@...gle.com>,
Steven Rostedt <srostedt@...hat.com>
Subject: Re: [PATCH 3/7] tracing: use generic __stringify
2009/3/10 Peter Zijlstra <peterz@...radead.org>:
> On Tue, 2009-03-10 at 11:56 +0100, Frederic Weisbecker wrote:
>> On Tue, Mar 10, 2009 at 12:57:13AM -0400, Steven Rostedt wrote:
>
>> > This removes the custom made STR(x) macros in the tracer and uses
>> > the generic __stringify macro instead.
>
>> Why not simply use the # ?
>
>> > -#define __STR(x) #x
>> > -#define STR(x) __STR(x)
>
> #include <stdio.h>
>
> #define FOO bar
>
> #define __STR(x) #x
> #define STR(x) __STR(x)
>
> void main(void)
> {
> printf("%s %s\n", __STR(FOO), STR(FOO));
> }
>
> $ gcc -o str str.c; ./str
> str.c: In function ‘main’:
> str.c:9: warning: return type of ‘main’ is not ‘int’
> FOO bar
Thank you both for the explanation.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists