Here's an interesting question that occurred in one of the OCCC  
entries that I was compiling with clang. This program:

$ cat d.c
#define x =

int foo(int *k) {
   return *k *x 37;
}

Generates this:

$ clang -ast-print d.c -triple=i686-apple-darwin9
typedef char *__builtin_va_list;
d.c:4:14: error: expected expression
   return *k *x 37;
              ^

int foo(int *k) {
}

1 diagnostic generated.

GCC also balks at this. It appears that there's a space being  
inserted after the "*" and before the "=" that "x" becomes. Is this  
expected?

-bw
_______________________________________________
cfe-dev mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

Reply via email to