[llvm-commits] [llvm] r46333 - /llvm/trunk/test/CFrontend/2008-01-24-StructAlignAndBitFields.c

Devang Patel dpatel at apple.com
Fri Jan 25 09:28:37 PST 2008


On Jan 25, 2008, at 6:11 AM, Duncan Sands wrote:

> Hi Devang, this patch causes:
>
> llvm-types.cpp: In member function ‘bool  
> TypeConverter::DecodeStructFields(tree_node*,  
> StructTypeConversionInfo&)’:
> llvm-types.cpp:1777: warning: comparison between signed and unsigned  
> integer expressions

I did not see this warning on darwin x86 and this line is not included  
in this patch. However, please apply t his patch if it helps you  
remove this warning.
Thanks,
-
Devang

Index: llvm-types.cpp
===================================================================
--- llvm-types.cpp	(revision 46334)
+++ llvm-types.cpp	(working copy)
@@ -1774,7 +1774,7 @@
      return false;
    }
    else if (TYPE_USER_ALIGN(TREE_TYPE(Field))
-           && DECL_ALIGN_UNIT(Field) != Info.getTypeAlignment(Ty)
+           && (unsigned) DECL_ALIGN_UNIT(Field) !=  
Info.getTypeAlignment(Ty)
             && !Info.isPacked()) {
      // If Field has user defined alignment and it does not match Ty  
alignment
      // then convert to a packed struct and try again.





More information about the llvm-commits mailing list