July 01, 2002
The following code snippet fails and causes an internal error in dmc v8.28n:

#include <stdio.h>
#define CONCAT(x,y)   x##y
#define NAMESPACE(x)  CONCAT(w32,x)
#define foo NAMESPACE(foo)

int foo (void) { }

int main (void)
{
  foo();
  return (0);
}

--------------------------------------------------
c:\net\watt\src>dmc -c test.c
int foo (void)
      ^
test.c(9) : Preprocessor error: unterminated macro argument
Fatal error: out of memory
--- errorlevel 1

--------------------------------------------------

If I do "#define NAMESPACE(x) w32 ## x", it compiles fine.

Gisle V.

July 01, 2002
Thanks! I'll check it out.