clang bug. (possibly preprocessor)

Hi!
Here is my new bugreport :slight_smile:
gcc accepts it. Its from xvid library, but it is heavily stripped down to be simple and clean.
it throws error with clang svn revision 51520.

code (filename is important, filename is: qpel.c) :

#ifndef XVID_AUTO_INCLUDE

#define XVID_AUTO_INCLUDE
#define FUNC_H H_Pass_16_C
#include “qpel.c”

#define FUNC_H H_Pass_8_C

#include “qpel.c”
#undef XVID_AUTO_INCLUDE

typedef void ff();
typedef struct { ff *a; } S;

S s = { H_Pass_8_C };

#endif

#if defined(XVID_AUTO_INCLUDE) && defined(REFERENCE_CODE)
#elif defined(XVID_AUTO_INCLUDE) && !defined(REFERENCE_CODE)

static void FUNC_H(){};
#undef FUNC_H

#endif

Hi Csaba,

Could you file a bugzilla report for this so that we can track the status of the problem?

   http://llvm.org/bugs/

Also, if you can, please make this test case self-contained. I'm not certain how I'm supposed to reproduce this error, since it includes "qpel.c", but your email implies the test case has that name, etc. If you can provide the exact command line (for clang) and test case than it will be much easier to figure out what is going wrong.

Thanks!
Ted