[cfe-dev] Is is possible to use ParseAST() without adding the clang predefines?

Roberto Bagnara bagnara at cs.unipr.it
Sat Feb 21 11:45:56 PST 2009


Daniel Dunbar wrote:
> It isn't inconceivable that we would want clang to be able to mimic
> other compilers as a general feature. Have you considered what would
> be necessary for DefineBuiltinMacro to directly support compatibility
> with whatever other compilers you are interested in?

I am not sure I understand the question.  What we do now is to undefine
(some of) the macros predefined by clang, and replace (some of) them with
the predefined macros of the other compiler.  This works for macros,
but we have a problem because of the  __builtin_va_list typedef:
we would want this to go away.

We are wondering if clang could be generalized so as to allow the
client application to decide what should be predefined and what not.
All the best,

   Roberto

-- 
Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:bagnara at cs.unipr.it



More information about the cfe-dev mailing list