PATCH: Restore Solaris/x86 Ada bootstrap: tracebak.c warning
Rainer Orth
ro@techfak.uni-bielefeld.de
Thu Jul 2 16:07:00 GMT 2009
I just noticed that a Solaris/x86 bootstrap (i386-pc-solaris2.10) fails
like this:
/vol/gcc/src/gcc-dist/gcc/ada/tracebak.c: In function '__gnat_backtrace':
/vol/gcc/src/gcc-dist/gcc/ada/tracebak.c:473:11: error: comparison between signed and unsigned integer expressions
/vol/gcc/src/gcc-dist/gcc/ada/tracebak.c:473:11: error: comparison between signed and unsigned integer expressions
/vol/gcc/src/gcc-dist/gcc/ada/tracebak.c:474:5: error: comparison between signed and unsigned integer expressions
The following trivial patch fixes this and allows the bootstrap to
continue; I suppose it counts as obvious?
Ok to commit?
Rainer
-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University
Thu Jul 2 17:59:19 2009 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* tracebak.c [i386 && sun] (IS_BAD_PTR): Use -1UL in comparison.
Index: gcc/ada/tracebak.c
===================================================================
--- gcc/ada/tracebak.c (revision 149169)
+++ gcc/ada/tracebak.c (working copy)
@@ -298,7 +298,7 @@ struct layout
#include <windows.h>
#define IS_BAD_PTR(ptr) (IsBadCodePtr((void *)ptr))
#elif defined (sun)
-#define IS_BAD_PTR(ptr) ((unsigned long)ptr == -1)
+#define IS_BAD_PTR(ptr) ((unsigned long)ptr == -1UL)
#else
#define IS_BAD_PTR(ptr) 0
#endif
More information about the Gcc-patches
mailing list