[LLVMdev] "long long" type in C backend

Jonathan S. Shapiro shap at eros-os.com
Mon Aug 11 13:50:42 PDT 2008


Hmm. Yes, I can see why that might make things difficult. Thanks for
taking the moment to answer, and this also nixes my comment about
descriptive integral type names.

shap


On Mon, 2008-08-11 at 13:45 -0700, Chris Lattner wrote:
> On Aug 11, 2008, at 1:40 PM, Jonathan S. Shapiro wrote:
> 
> > On Mon, 2008-08-11 at 13:29 -0700, Chris Lattner wrote:
> >> The CBE output can't #include standard headers, the macros and types
> >> that are defined in the headers will conflict.
> >
> > Is that true for the freestanding header files?
> 
> Yes.  The only exceptions to the rule have been alloca.h, setjmp.h and  
> stdarg.h, and even those have been a huge pain and we avoid them on  
> platforms where we can.
> 
> One example problem is that llvm doesn't preserve signedness of types,  
> so you end up with a header defining:
> 
> void foo(int);
> 
> and the CBE emits a prototype of:
> 
> void foo(unsigned);
> 
> which leads to compilation failures.
> 
> -Chris
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list