[cfe-dev] Small patch to get clang working on Minix 3

Kees van Reeuwijk reeuwijk at few.vu.nl
Wed Mar 24 12:58:41 PDT 2010


Hi,

Thanks for all the replies to my earlier email. Sorry for the late reply.

The problem I'm trying to solve is that in Basic/Diagnostic.h I get complaints that intptr_t is unknown. I have now added 
#include "llvm/Support/DataTypes.h"

instead of <stdint.h>, and this also solves the problem.

I don't understand why you say that the problem is somewhere else. The type intptr_t is used in basic/Diagnostic.h, and none of the original includes looks like something that should define intptr_t. Is it perhaps convention to use Basic/Diagnostic.h only when it is guaranteed that intptr_t is defined? That seems unlikely to me.

It seems to me that the #include I add enhances portability, because otherwise the compilation relies on stdint.h (or equivalent) to be included as a side-effect.

BTW, 
grepping on stdint.h in the clang source tree shows that there are 9 source files with
#include <stdint.h>
but I also note that there is a stdint.h in lib/Headers. Perhaps my #include <stdint.h> in Basic/Diagnostic.h pulled in that one. I don't know enough about clang header files to understand what's going on there.



-- 
Kees van Reeuwijk


On 16 Mar 2010, at 17:39, Anton Korobeynikov wrote:

> Hello
> 
>> +#include <stdint.h>
> We cannot used stdint.h include - this file does not exist with VCPP
> (also, you don't use the proper order of includes, etc.).
> You should at least use Support/DataTypes.h. However, the problem is
> definitely somewhere else, such include just masks the real problem.
> 
> -- 
> With best regards, Anton Korobeynikov
> Faculty of Mathematics and Mechanics, Saint Petersburg State University





More information about the cfe-dev mailing list