[cfe-dev] clang unable to build example C file

Török Edvin edwintorok at gmail.com
Wed Oct 10 13:53:05 PDT 2007


On 10/10/07, Chris Lattner <clattner at apple.com> wrote:
>
> This certainly should work, and does for me :).

Did I say that I have x86-64 arch? Is clang supported on it?
Or should I retry in a 32-bit chroot?
[that is going to take a while, so I'll only be able to report on this
tomorrow.]

> I bet that if you
> revert clang back to r42817 that it will work for you.

Trying...
No, that doesn't work either. Same valgrind warnings too.
Should I revert llvm to r42817 too?

>
> Do you have valgrind available on your machine?

Sure thing, I use it for code I develop all the time. Lets see:
ERROR SUMMARY: 595 errors from 14 contexts (suppressed: 8 from 2)

==21571== Memcheck, a memory error detector.
==21571== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==21571== Using LibVEX rev 1732, a library for dynamic binary translation.
==21571== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==21571== Using valgrind-3.2.3-Debian, a dynamic binary
instrumentation framework.
==21571== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==21571== For more details, rerun with: -v
==21571==
==21571== Conditional jump or move depends on uninitialised value(s)
==21571==    at 0x51AEE5: clang::IdentifierInfo::getPPKeywordID()
const (in /usr/local/bin/clang)
==21571==    by 0x5149E4:
clang::Preprocessor::HandleDirective(clang::Token&) (in
/usr/local/bin/clang)
==21571==    by 0x5038FD:
clang::Lexer::LexTokenInternal(clang::Token&) (in
/usr/local/bin/clang)
==21571==    by 0x4E44A7: clang::Parser::Initialize() (in /usr/local/bin/clang)
==21571==    by 0x49F8E7: clang::ParseAST(clang::Preprocessor&,
unsigned, clang::ASTConsumer&, bool) (in /usr/local/bin/clang)
==21571==    by 0x47A5A3: main (in /usr/local/bin/clang)
==21571==
==21571== Conditional jump or move depends on uninitialised value(s)
==21571==    at 0x51AEEB: clang::IdentifierInfo::getPPKeywordID()
const (in /usr/local/bin/clang)
==21571==    by 0x5149E4:
clang::Preprocessor::HandleDirective(clang::Token&) (in
/usr/local/bin/clang)
==21571==    by 0x5038FD:
clang::Lexer::LexTokenInternal(clang::Token&) (in
/usr/local/bin/clang)
==21571==    by 0x4E44A7: clang::Parser::Initialize() (in /usr/local/bin/clang)
==21571==    by 0x49F8E7: clang::ParseAST(clang::Preprocessor&,
unsigned, clang::ASTConsumer&, bool) (in /usr/local/bin/clang)
==21571==    by 0x47A5A3: main (in /usr/local/bin/clang)
==21571==
==21571== Conditional jump or move depends on uninitialised value(s)
==21571==    at 0x51AF65: clang::IdentifierInfo::getPPKeywordID()
const (in /usr/local/bin/clang)
==21571==    by 0x5149E4:
clang::Preprocessor::HandleDirective(clang::Token&) (in
/usr/local/bin/clang)
==21571==    by 0x5038FD:
clang::Lexer::LexTokenInternal(clang::Token&) (in
/usr/local/bin/clang)
==21571==    by 0x4E44A7: clang::Parser::Initialize() (in /usr/local/bin/clang)
==21571==    by 0x49F8E7: clang::ParseAST(clang::Preprocessor&,
unsigned, clang::ASTConsumer&, bool) (in /usr/local/bin/clang)
==21571==    by 0x47A5A3: main (in /usr/local/bin/clang)
==21571==
==21571== Conditional jump or move depends on uninitialised value(s)
==21571==    at 0x51AF6B: clang::IdentifierInfo::getPPKeywordID()
const (in /usr/local/bin/clang)
==21571==    by 0x5149E4:
clang::Preprocessor::HandleDirective(clang::Token&) (in
/usr/local/bin/clang)
==21571==    by 0x5038FD:
clang::Lexer::LexTokenInternal(clang::Token&) (in
/usr/local/bin/clang)
==21571==    by 0x4E44A7: clang::Parser::Initialize() (in /usr/local/bin/clang)
==21571==    by 0x49F8E7: clang::ParseAST(clang::Preprocessor&,
unsigned, clang::ASTConsumer&, bool) (in /usr/local/bin/clang)
==21571==    by 0x47A5A3: main (in /usr/local/bin/clang)
==21571==
==21571== Conditional jump or move depends on uninitialised value(s)
==21571==    at 0x51B025: clang::IdentifierInfo::getPPKeywordID()
const (in /usr/local/bin/clang)
==21571==    by 0x5149E4:
clang::Preprocessor::HandleDirective(clang::Token&) (in
/usr/local/bin/clang)
==21571==    by 0x5038FD:
clang::Lexer::LexTokenInternal(clang::Token&) (in
/usr/local/bin/clang)
==21571==    by 0x4E44A7: clang::Parser::Initialize() (in /usr/local/bin/clang)
==21571==    by 0x49F8E7: clang::ParseAST(clang::Preprocessor&,
unsigned, clang::ASTConsumer&, bool) (in /usr/local/bin/clang)
==21571==    by 0x47A5A3: main (in /usr/local/bin/clang)
==21571==
==21571== Conditional jump or move depends on uninitialised value(s)
==21571==    at 0x51B02B: clang::IdentifierInfo::getPPKeywordID()
const (in /usr/local/bin/clang)
==21571==    by 0x5149E4:
clang::Preprocessor::HandleDirective(clang::Token&) (in
/usr/local/bin/clang)
==21571==    by 0x5038FD:
clang::Lexer::LexTokenInternal(clang::Token&) (in
/usr/local/bin/clang)
==21571==    by 0x4E44A7: clang::Parser::Initialize() (in /usr/local/bin/clang)
==21571==    by 0x49F8E7: clang::ParseAST(clang::Preprocessor&,
unsigned, clang::ASTConsumer&, bool) (in /usr/local/bin/clang)
==21571==    by 0x47A5A3: main (in /usr/local/bin/clang)
==21571==
==21571== Conditional jump or move depends on uninitialised value(s)
==21571==    at 0x51B086: clang::IdentifierInfo::getPPKeywordID()
const (in /usr/local/bin/clang)
==21571==    by 0x5149E4:
clang::Preprocessor::HandleDirective(clang::Token&) (in
/usr/local/bin/clang)
==21571==    by 0x5038FD:
clang::Lexer::LexTokenInternal(clang::Token&) (in
/usr/local/bin/clang)
==21571==    by 0x4E44A7: clang::Parser::Initialize() (in /usr/local/bin/clang)
==21571==    by 0x49F8E7: clang::ParseAST(clang::Preprocessor&,
unsigned, clang::ASTConsumer&, bool) (in /usr/local/bin/clang)
==21571==    by 0x47A5A3: main (in /usr/local/bin/clang)
<predefines>:1:2: error: invalid preprocessing directive
#define __STDC__ 1
 ^
<predefines>:2:2: error: invalid preprocessing directive
#define __STDC_VERSION__ 199901L
 ^
<predefines>:3:2: error: invalid preprocessing directive
#define __STDC_HOSTED__ 1
 ^
==21571==
==21571== Conditional jump or move depends on uninitialised value(s)
==21571==    at 0x51AEE5: clang::IdentifierInfo::getPPKeywordID()
const (in /usr/local/bin/clang)
==21571==    by 0x5149E4:
clang::Preprocessor::HandleDirective(clang::Token&) (in
/usr/local/bin/clang)
==21571==    by 0x5038FD:
clang::Lexer::LexTokenInternal(clang::Token&) (in
/usr/local/bin/clang)
==21571==    by 0x4EA23D:
clang::Parser::ParseInitDeclaratorListAfterFirstDeclarator(clang::Declarator&)
(in /usr/local/bin/clang)
==21571==    by 0x4ED3B8:
clang::Parser::ParseSimpleDeclaration(unsigned) (in
/usr/local/bin/clang)
==21571==    by 0x4E7A3E: clang::Parser::ParseExternalDeclaration()
(in /usr/local/bin/clang)
==21571==    by 0x4E7D2C: clang::Parser::ParseTopLevelDecl(void*&) (in
/usr/local/bin/clang)
==21571==    by 0x49F940: clang::ParseAST(clang::Preprocessor&,
unsigned, clang::ASTConsumer&, bool) (in /usr/local/bin/clang)
==21571==    by 0x47A5A3: main (in /usr/local/bin/clang)
==21571==
==21571== Conditional jump or move depends on uninitialised value(s)
==21571==    at 0x51AEEB: clang::IdentifierInfo::getPPKeywordID()
const (in /usr/local/bin/clang)
==21571==    by 0x5149E4:
clang::Preprocessor::HandleDirective(clang::Token&) (in
/usr/local/bin/clang)
==21571==    by 0x5038FD:
clang::Lexer::LexTokenInternal(clang::Token&) (in
/usr/local/bin/clang)
==21571==    by 0x4EA23D:
clang::Parser::ParseInitDeclaratorListAfterFirstDeclarator(clang::Declarator&)
(in /usr/local/bin/clang)
==21571==    by 0x4ED3B8:
clang::Parser::ParseSimpleDeclaration(unsigned) (in
/usr/local/bin/clang)
==21571==    by 0x4E7A3E: clang::Parser::ParseExternalDeclaration()
(in /usr/local/bin/clang)
==21571==    by 0x4E7D2C: clang::Parser::ParseTopLevelDecl(void*&) (in
/usr/local/bin/clang)
==21571==    by 0x49F940: clang::ParseAST(clang::Preprocessor&,
unsigned, clang::ASTConsumer&, bool) (in /usr/local/bin/clang)
==21571==    by 0x47A5A3: main (in /usr/local/bin/clang)
==21571==
==21571== Conditional jump or move depends on uninitialised value(s)
==21571==    at 0x51AF65: clang::IdentifierInfo::getPPKeywordID()
const (in /usr/local/bin/clang)
==21571==    by 0x5149E4:
clang::Preprocessor::HandleDirective(clang::Token&) (in
/usr/local/bin/clang)
==21571==    by 0x5038FD:
clang::Lexer::LexTokenInternal(clang::Token&) (in
/usr/local/bin/clang)
==21571==    by 0x4EA23D:
clang::Parser::ParseInitDeclaratorListAfterFirstDeclarator(clang::Declarator&)
(in /usr/local/bin/clang)
==21571==    by 0x4ED3B8:
clang::Parser::ParseSimpleDeclaration(unsigned) (in
/usr/local/bin/clang)
==21571==    by 0x4E7A3E: clang::Parser::ParseExternalDeclaration()
(in /usr/local/bin/clang)
==21571==    by 0x4E7D2C: clang::Parser::ParseTopLevelDecl(void*&) (in
/usr/local/bin/clang)
==21571==    by 0x49F940: clang::ParseAST(clang::Preprocessor&,
unsigned, clang::ASTConsumer&, bool) (in /usr/local/bin/clang)
==21571==    by 0x47A5A3: main (in /usr/local/bin/clang)
==21571==
==21571== Conditional jump or move depends on uninitialised value(s)
==21571==    at 0x51AF6B: clang::IdentifierInfo::getPPKeywordID()
const (in /usr/local/bin/clang)
==21571==    by 0x5149E4:
clang::Preprocessor::HandleDirective(clang::Token&) (in
/usr/local/bin/clang)
==21571==    by 0x5038FD:
clang::Lexer::LexTokenInternal(clang::Token&) (in
/usr/local/bin/clang)
==21571==    by 0x4EA23D:
clang::Parser::ParseInitDeclaratorListAfterFirstDeclarator(clang::Declarator&)
(in /usr/local/bin/clang)
==21571==    by 0x4ED3B8:
clang::Parser::ParseSimpleDeclaration(unsigned) (in
/usr/local/bin/clang)
==21571==    by 0x4E7A3E: clang::Parser::ParseExternalDeclaration()
(in /usr/local/bin/clang)
==21571==    by 0x4E7D2C: clang::Parser::ParseTopLevelDecl(void*&) (in
/usr/local/bin/clang)
==21571==    by 0x49F940: clang::ParseAST(clang::Preprocessor&,
unsigned, clang::ASTConsumer&, bool) (in /usr/local/bin/clang)
==21571==    by 0x47A5A3: main (in /usr/local/bin/clang)
==21571==
==21571== Conditional jump or move depends on uninitialised value(s)
==21571==    at 0x51B025: clang::IdentifierInfo::getPPKeywordID()
const (in /usr/local/bin/clang)
==21571==    by 0x5149E4:
clang::Preprocessor::HandleDirective(clang::Token&) (in
/usr/local/bin/clang)
==21571==    by 0x5038FD:
clang::Lexer::LexTokenInternal(clang::Token&) (in
/usr/local/bin/clang)
==21571==    by 0x4EA23D:
clang::Parser::ParseInitDeclaratorListAfterFirstDeclarator(clang::Declarator&)
(in /usr/local/bin/clang)
==21571==    by 0x4ED3B8:
clang::Parser::ParseSimpleDeclaration(unsigned) (in
/usr/local/bin/clang)
==21571==    by 0x4E7A3E: clang::Parser::ParseExternalDeclaration()
(in /usr/local/bin/clang)
==21571==    by 0x4E7D2C: clang::Parser::ParseTopLevelDecl(void*&) (in
/usr/local/bin/clang)
==21571==    by 0x49F940: clang::ParseAST(clang::Preprocessor&,
unsigned, clang::ASTConsumer&, bool) (in /usr/local/bin/clang)
==21571==    by 0x47A5A3: main (in /usr/local/bin/clang)
==21571==
==21571== Conditional jump or move depends on uninitialised value(s)
==21571==    at 0x51B02B: clang::IdentifierInfo::getPPKeywordID()
const (in /usr/local/bin/clang)
==21571==    by 0x5149E4:
clang::Preprocessor::HandleDirective(clang::Token&) (in
/usr/local/bin/clang)
==21571==    by 0x5038FD:
clang::Lexer::LexTokenInternal(clang::Token&) (in
/usr/local/bin/clang)
==21571==    by 0x4EA23D:
clang::Parser::ParseInitDeclaratorListAfterFirstDeclarator(clang::Declarator&)
(in /usr/local/bin/clang)
==21571==    by 0x4ED3B8:
clang::Parser::ParseSimpleDeclaration(unsigned) (in
/usr/local/bin/clang)
==21571==    by 0x4E7A3E: clang::Parser::ParseExternalDeclaration()
(in /usr/local/bin/clang)
==21571==    by 0x4E7D2C: clang::Parser::ParseTopLevelDecl(void*&) (in
/usr/local/bin/clang)
==21571==    by 0x49F940: clang::ParseAST(clang::Preprocessor&,
unsigned, clang::ASTConsumer&, bool) (in /usr/local/bin/clang)
==21571==    by 0x47A5A3: main (in /usr/local/bin/clang)
==21571==
==21571== Conditional jump or move depends on uninitialised value(s)
==21571==    at 0x51B086: clang::IdentifierInfo::getPPKeywordID()
const (in /usr/local/bin/clang)
==21571==    by 0x5149E4:
clang::Preprocessor::HandleDirective(clang::Token&) (in
/usr/local/bin/clang)
==21571==    by 0x5038FD:
clang::Lexer::LexTokenInternal(clang::Token&) (in
/usr/local/bin/clang)
==21571==    by 0x4EA23D:
clang::Parser::ParseInitDeclaratorListAfterFirstDeclarator(clang::Declarator&)
(in /usr/local/bin/clang)
==21571==    by 0x4ED3B8:
clang::Parser::ParseSimpleDeclaration(unsigned) (in
/usr/local/bin/clang)
==21571==    by 0x4E7A3E: clang::Parser::ParseExternalDeclaration()
(in /usr/local/bin/clang)
==21571==    by 0x4E7D2C: clang::Parser::ParseTopLevelDecl(void*&) (in
/usr/local/bin/clang)
==21571==    by 0x49F940: clang::ParseAST(clang::Preprocessor&,
unsigned, clang::ASTConsumer&, bool) (in /usr/local/bin/clang)
==21571==    by 0x47A5A3: main (in /usr/local/bin/clang)
<predefines>:5:2: error: invalid preprocessing directive
#define __APPLE__ 1
 ^
<predefines>:6:2: error: invalid preprocessing directive
#define __MACH__ 1
 ^
<predefines>:7:2: error: invalid preprocessing directive
#define __weak
 ^
<predefines>:8:2: error: invalid preprocessing directive
#define __strong
 ^
<predefines>:9:2: error: invalid preprocessing directive
#define __CONSTANT_CFSTRINGS__ 1
 ^
<predefines>:10:2: error: invalid preprocessing directive
#define __i386__ 1
 ^
<predefines>:11:2: error: invalid preprocessing directive
#define __i386 1
 ^
<predefines>:12:2: error: invalid preprocessing directive
#define i386 1
 ^
<predefines>:13:2: error: invalid preprocessing directive
#define __LITTLE_ENDIAN__ 1
 ^
<predefines>:14:2: error: invalid preprocessing directive
#define __INTMAX_MAX__ 9223372036854775807LL
 ^
<predefines>:15:2: error: invalid preprocessing directive
#define __INTMAX_TYPE__ long long int
 ^
<predefines>:16:2: error: invalid preprocessing directive
#define __LONG_MAX__ 2147483647L
 ^
<predefines>:17:2: error: invalid preprocessing directive
#define __PTRDIFF_TYPE__ int
 ^
<predefines>:18:2: error: invalid preprocessing directive
#define __UINTMAX_TYPE__ long long unsigned int
 ^
<predefines>:19:2: error: invalid preprocessing directive
#define __CHAR_BIT__ 8
 ^
<predefines>:20:2: error: invalid preprocessing directive
#define __INT_MAX__ 2147483647
 ^
<predefines>:21:2: error: invalid preprocessing directive
#define __LONG_LONG_MAX__ 9223372036854775807LL
 ^
<predefines>:22:2: error: invalid preprocessing directive
#define __SCHAR_MAX__ 127
 ^
<predefines>:23:2: error: invalid preprocessing directive
#define __SHRT_MAX__ 32767
 ^
<predefines>:24:2: error: invalid preprocessing directive
#define __SIZE_TYPE__ long unsigned int
 ^
<predefines>:25:2: error: invalid preprocessing directive
#define __nocona 1
 ^
<predefines>:26:2: error: invalid preprocessing directive
#define __nocona__ 1
 ^
<predefines>:27:2: error: invalid preprocessing directive
#define __tune_nocona__ 1
 ^
<predefines>:28:2: error: invalid preprocessing directive
#define __SSE2_MATH__ 1
 ^
<predefines>:29:2: error: invalid preprocessing directive
#define __SSE2__ 1
 ^
<predefines>:30:2: error: invalid preprocessing directive
#define __SSE_MATH__ 1
 ^
<predefines>:31:2: error: invalid preprocessing directive
#define __SSE__ 1
 ^
<predefines>:32:2: error: invalid preprocessing directive
#define __MMX__ 1
 ^
<predefines>:33:2: error: invalid preprocessing directive
#define __REGISTER_PREFIX__
 ^
<predefines>:34:2: error: invalid preprocessing directive
#define __WCHAR_MAX__ 2147483647
 ^
<predefines>:35:2: error: invalid preprocessing directive
#define __WCHAR_TYPE__ int
 ^
<predefines>:36:2: error: invalid preprocessing directive
#define __WINT_TYPE__ int
 ^
<predefines>:37:2: error: invalid preprocessing directive
#define __FLT_DENORM_MIN__ 1.40129846e-45F
 ^
<predefines>:38:2: error: invalid preprocessing directive
#define __FLT_DIG__ 6
 ^
<predefines>:39:2: error: invalid preprocessing directive
#define __FLT_EPSILON__ 1.19209290e-7F
 ^
<predefines>:40:2: error: invalid preprocessing directive
#define __FLT_EVAL_METHOD__ 0
 ^
<predefines>:41:2: error: invalid preprocessing directive
#define __FLT_HAS_INFINITY__ 1
 ^
<predefines>:42:2: error: invalid preprocessing directive
#define __FLT_HAS_QUIET_NAN__ 1
 ^
<predefines>:43:2: error: invalid preprocessing directive
#define __FLT_MANT_DIG__ 24
 ^
<predefines>:44:2: error: invalid preprocessing directive
#define __FLT_MAX_10_EXP__ 38
 ^
<predefines>:45:2: error: invalid preprocessing directive
#define __FLT_MAX_EXP__ 128
 ^
<predefines>:46:2: error: invalid preprocessing directive
#define __FLT_MAX__ 3.40282347e+38F
 ^
<predefines>:47:2: error: invalid preprocessing directive
#define __FLT_MIN_10_EXP__ (-37)
 ^
<predefines>:48:2: error: invalid preprocessing directive
#define __FLT_MIN_EXP__ (-125)
 ^
<predefines>:49:2: error: invalid preprocessing directive
#define __FLT_MIN__ 1.17549435e-38F
 ^
<predefines>:50:2: error: invalid preprocessing directive
#define __FLT_RADIX__ 2
 ^
<predefines>:51:2: error: invalid preprocessing directive
#define __DBL_DENORM_MIN__ 4.9406564584124654e-324
 ^
<predefines>:52:2: error: invalid preprocessing directive
#define __DBL_DIG__ 15
 ^
<predefines>:53:2: error: invalid preprocessing directive
#define __DBL_EPSILON__ 2.2204460492503131e-16
 ^
<predefines>:54:2: error: invalid preprocessing directive
#define __DBL_HAS_INFINITY__ 1
 ^
<predefines>:55:2: error: invalid preprocessing directive
#define __DBL_HAS_QUIET_NAN__ 1
 ^
<predefines>:56:2: error: invalid preprocessing directive
#define __DBL_MANT_DIG__ 53
 ^
<predefines>:57:2: error: invalid preprocessing directive
#define __DBL_MAX_10_EXP__ 308
 ^
<predefines>:58:2: error: invalid preprocessing directive
#define __DBL_MAX_EXP__ 1024
 ^
<predefines>:59:2: error: invalid preprocessing directive
#define __DBL_MAX__ 1.7976931348623157e+308
 ^
<predefines>:60:2: error: invalid preprocessing directive
#define __DBL_MIN_10_EXP__ (-307)
 ^
<predefines>:61:2: error: invalid preprocessing directive
#define __DBL_MIN_EXP__ (-1021)
 ^
<predefines>:62:2: error: invalid preprocessing directive
#define __DBL_MIN__ 2.2250738585072014e-308
 ^
<predefines>:63:2: error: invalid preprocessing directive
#define __DECIMAL_DIG__ 21
 ^
<predefines>:64:2: error: invalid preprocessing directive
#define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L
 ^
<predefines>:65:2: error: invalid preprocessing directive
#define __LDBL_DIG__ 18
 ^
<predefines>:66:2: error: invalid preprocessing directive
#define __LDBL_EPSILON__ 1.08420217248550443401e-19L
 ^
<predefines>:67:2: error: invalid preprocessing directive
#define __LDBL_HAS_INFINITY__ 1
 ^
<predefines>:68:2: error: invalid preprocessing directive
#define __LDBL_HAS_QUIET_NAN__ 1
 ^
<predefines>:69:2: error: invalid preprocessing directive
#define __LDBL_MANT_DIG__ 64
 ^
<predefines>:70:2: error: invalid preprocessing directive
#define __LDBL_MAX_10_EXP__ 4932
 ^
<predefines>:71:2: error: invalid preprocessing directive
#define __LDBL_MAX_EXP__ 16384
 ^
<predefines>:72:2: error: invalid preprocessing directive
#define __LDBL_MAX__ 1.18973149535723176502e+4932L
 ^
<predefines>:73:2: error: invalid preprocessing directive
#define __LDBL_MIN_10_EXP__ (-4931)
 ^
<predefines>:74:2: error: invalid preprocessing directive
#define __LDBL_MIN_EXP__ (-16381)
 ^
<predefines>:75:2: error: invalid preprocessing directive
#define __LDBL_MIN__ 3.36210314311209350626e-4932L
 ^
<predefines>:76:2: error: invalid preprocessing directive
#define __APPLE_CC__ 5250
 ^
<predefines>:77:2: error: invalid preprocessing directive
#define __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ 1030
 ^
<predefines>:78:2: error: invalid preprocessing directive
#define __GNUC_MINOR__ 0
 ^
<predefines>:79:2: error: invalid preprocessing directive
#define __GNUC_PATCHLEVEL__ 1
 ^
<predefines>:80:2: error: invalid preprocessing directive
#define __GNUC__ 4
 ^
<predefines>:81:2: error: invalid preprocessing directive
#define __GXX_ABI_VERSION 1002
 ^
<predefines>:82:2: error: invalid preprocessing directive
#define __VERSION__ "4.0.1 (Apple Computer, Inc. build 5250)"
 ^
<predefines>:83:2: error: invalid preprocessing directive
#define __DYNAMIC__ 1
 ^
<predefines>:84:2: error: invalid preprocessing directive
#define __FINITE_MATH_ONLY__ 0
 ^
<predefines>:85:2: error: invalid preprocessing directive
#define __NO_INLINE__ 1
 ^
<predefines>:86:2: error: invalid preprocessing directive
#define __PIC__ 1
 ^
85 diagnostics generated.
==21571==
==21571== ERROR SUMMARY: 595 errors from 14 contexts (suppressed: 8 from 2)
==21571== malloc/free: in use at exit: 1,616 bytes in 27 blocks.
==21571== malloc/free: 727 allocs, 700 frees, 217,954 bytes allocated.
==21571== For counts of detected errors, rerun with: -v
==21571== searching for pointers to 27 not-freed blocks.
==21571== checked 229,152 bytes.
==21571==
==21571== LEAK SUMMARY:
==21571==    definitely lost: 480 bytes in 7 blocks.
==21571==      possibly lost: 0 bytes in 0 blocks.
==21571==    still reachable: 1,136 bytes in 20 blocks.
==21571==         suppressed: 0 bytes in 0 blocks.
==21571== Rerun with --leak-check=full to see details of leaked memory.


> If so, I'd be
> curious to find out if it reports any problems.

See above.

> The other
> possibility is that it may be a miscompilation by gcc 4.2.1.  Can you
> please run 'make check' in the main llvm/test directory and see if
> you have problems there?

Yes.
FAIL: /home/edwin/llvm-svn/llvm/test/Bindings/Ocaml/analysis.ml
Failed with exit(2) at line 1
while running: /usr/bin/ocamlc -cc g++ -I
/home/edwin/llvm-svn/llvm/Release/lib/ocaml llvm.cma llvm_analysis.cma
/home/edwin/llvm-svn/llvm/test/Bindings/Ocaml/analysis.ml -o
analysis.ml.tmp
File "/home/edwin/llvm-svn/llvm/test/Bindings/Ocaml/analysis.ml", line
39, characters 12-54:
Warning X: this statement never returns (or has an unsound type.)
/tmp/camlprim81a59e.c:839: warning: deprecated conversion from string
constant to 'char*'
<... repeated lots of times, till I run out of space on /tmp ... >

Does that work for you?

--Edwin



More information about the cfe-dev mailing list