[Assorted-commits] SF.net SVN: assorted:[1312] sandbox/trunk/src/c/macros.c
Brought to you by:
yangzhang
From: <yan...@us...> - 2009-03-20 05:35:55
|
Revision: 1312 http://assorted.svn.sourceforge.net/assorted/?rev=1312&view=rev Author: yangzhang Date: 2009-03-20 05:35:47 +0000 (Fri, 20 Mar 2009) Log Message: ----------- updated macro demo Modified Paths: -------------- sandbox/trunk/src/c/macros.c Modified: sandbox/trunk/src/c/macros.c =================================================================== --- sandbox/trunk/src/c/macros.c 2009-03-19 22:19:57 UTC (rev 1311) +++ sandbox/trunk/src/c/macros.c 2009-03-20 05:35:47 UTC (rev 1312) @@ -12,6 +12,14 @@ // Not really a preprocessor extension. #define dup(x,y) typeof(x) y = x; +// Can we define a macro that defines macros? No.... +// If we try to evaluate this we get +// error: '#' is not followed by a macro parameter +#if 0 +#define defmacros() \ +#define foo bar +#endif + int main() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |