[cfe-dev] Parser Stmt/Expr Owning Pointer

Sebastian Redl sebastian.redl at getdesigned.at
Tue Dec 9 11:01:57 PST 2008


Chris Lattner wrote:
> On Dec 9, 2008, at 1:53 AM, Sebastian Redl wrote:
>>> widely deployed in vendor compilers.  :(  It sucks to have to write 
>>> portable code.
>> Fortunately, rvalue references are the first thing any compiler 
>> implements from C++0x, apparently. GCC 4.3+ supports them, 
>> CodeWarrior supports them, Visual Studio 2010 supports them. They 
>> will definitely be the first thing that can be used portably.
>
> Excellent, they are one of my favorite features of '0x.
Yes, mine too. So deceptively simple, so far-reaching in consequence.
>> I'm on a Linux system. Surely there must be some huge system headers 
>> out there. But in my search, I can't find anything. A combination of 
>> gtk.h, ncurses.h and WINE's windows.h merely yields 2.6 MB.
>
> Gosh you guys have anemic headers :).  Here's a dump of carbon.h on a 
> leopard system with -E -P, it should work for you as a C parser test:
>
> http://nondot.org/sabre/carbon.i.gz
> and here's cocoa.h, an objc testcase:
> http://nondot.org/sabre/Cocoa.mi.gz
Thanks, but I get several errors like this:

carbon.i:965:33: error: typedef redefinition with different types 
('typeof(sizeof(int))' vs '__darwin_size_t')
typedef __typeof__(sizeof(int)) size_t;
                                ^
carbon.i:157:25: note: previous definition is here
typedef __darwin_size_t size_t;
                        ^

Both with default arch (-triple=x86_64-linux-gnu) and forcing 32-bit 
(-triple=i686-linux-gnu).


Sebastian



More information about the cfe-dev mailing list