lkml.org 
[lkml]   [2009]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 3/7] tracing: use generic __stringify
From
Date
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



--
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: 2009-03-10 12:25    [from the cache]
©2003-2011 Jasper Spaans