Discussion:
[ragel-users] Generated cc failed to compile textmate under OS X ML with latest Xcode command line tools
191919
2012-12-13 13:30:22 UTC
Permalink
Hi,

I use ragel git to compile textmate in OS X ML 10.8.2 with latest Xcode command line tools but failed.

clang version:

$ clang -v
Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin12.2.1
Thread model: posix

The file which didn't pass the compilation is:

https://github.com/textmate/textmate/blob/master/Frameworks/plist/src/ascii.rl

The compiler generated the following error when compiling the generated ascii.cc file:

/Users/jh/build/TextMate/Frameworks/plist/src/ascii.cc:45:2: error: constant expression evaluates to -1 which cannot be narrowed to type 'char' [-Wc++11-narrowing]
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0
^~
/Users/jh/build/TextMate/Frameworks/plist/src/ascii.cc:45:2: note: override this message by inserting an explicit cast
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0
??.

^~
st)tic_cast<char>(
/Users/jh/build/TextMate/Frameworks/plist/src/ascii.cc:45:6: error: constant expression evaluates to -1 which cannot be narrowed to type 'char' [-Wc++11-narrowing]
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0
^~
/Users/jh/build/TextMate/Frameworks/plist/src/ascii.cc:45:6: note: override this message by inserting an explicit cast
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0
^~
?...
fatal error: too many errors emitted, stopping now [-ferror-limit=]

With the release version (ragel-6.7.tar.gz (http://www.complang.org/ragel/ragel-6.7.tar.gz)) of ragel, clang succeeded to compile without any problems.

--
191919

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.complang.org/pipermail/ragel-users/attachments/20121213/c25a7e4b/attachment.html>
Adrian Thurston
2012-12-13 16:18:50 UTC
Permalink
Hello 191919,

The current git master has undergone some major changes. Thanks for the report I will fix this.

Adrian
-----Original Message-----
From: 191919 <191919 at gmail.com>
Sender: ragel-users-bounces at complang.org
Date: Thu, 13 Dec 2012 21:30:22
To: <ragel-users at complang.org>
Reply-To: ragel-users at complang.org
Subject: [ragel-users] Generated cc failed to compile textmate under OS X ML
with latest Xcode command line tools

Loading...