[cfe-dev] GCC compatibility layer going too far?
Ludovic Courtès
ludovic.courtes at inria.fr
Thu Jan 19 06:32:54 PST 2012
Hi,
A project I work on produces a GCC plug-in. A ‘configure’ macro aims to
check whether GCC is being used, and whether it supports plug-ins:
https://gforge.inria.fr/scm/viewvc.php/trunk/m4/gcc.m4?view=markup&revision=5169&root=starpu&pathrev=5202
Despite being fairly elaborate, the macro returns “yes” for Clang 3.1.
However, Clang isn’t able to actually compile the plug-in, because there
are several GNU extensions used in GCC’s headers and in the plug-in
itself that are not supported (such as nested functions.)
One of the reasons why the feature test passes is that
‘clang -print-file-name=plugin’ returns GCC’s (!) header directory.
What do you think of having Clang error out instead, or perhaps return
the path to LLVM’s headers?
Thanks,
Ludo’.
More information about the cfe-dev
mailing list