[cfe-dev] First steps with Clang; unknown builtins '__builtin_va_start' and '__builtin_va_end'

Eli Friedman eli.friedman at gmail.com
Mon Sep 13 18:36:59 PDT 2010


2010/9/13 Francis Gagné <fragag at hotmail.com>:
>
> Hello,
>
> I am currently working on some libraries written in C, for which I am writing documentation in an external XML document (using a custom schema), and I would like to use the Clang libraries to check that my documentation is up-to-date (i.e. that all functions/types/members are documented, and that all documented items are still present in the source code.
>
> I started writing some code a bit at random, because the best source of documentation on Clang I could find is the Doxygen documentation, which is not really useful when I don't know what classes or functions I am supposed to use. This is my first experience with Clang, so I'm a bit lost. The following snippet has main0, my first attempt, and main, my second attempt.
>
> http://pastebin.com/T494mbmD
>
> Currently, both fail with the same errors:
>
> c:/mingw/include/stdio.h:245:35: error: use of unknown builtin '__builtin_va_start'
>  __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format );
>                                  ^
> c:/mingw/include/stdio.h:247:3: error: use of unknown builtin '__builtin_va_end'
>  __builtin_va_end( __local_argv );
>  ^

Have you tried following the example in examples/clang-interpreter/ in
the source tree?  Getting all the setup code exactly right can be
tricky...

-Eli




More information about the cfe-dev mailing list