s-stchop-rtems.adb patch

Joel Sherrill joel.sherrill@oarcorp.com
Tue Sep 22 14:50:00 GMT 2009


Hi,

I was getting 100% ACATS failures on m68k/coldfire (uc5282 board)
because the C99 bool is not an int, it is only 8 bits.  Apparently
it was ok on the other architectures we run ACATS on.

Is unsigned_char the best type for the binding?

OK to commit if it is?

2009-09-22  Joel Sherrill <joel.sherrill@oarcorp.com>

    * s-stchop-rtems.adb: Use unsigned_char for bool return value.


Index: s-stchop-rtems.adb
===================================================================
--- s-stchop-rtems.adb    (revision 151936)
+++ s-stchop-rtems.adb    (working copy)
@@ -80,8 +80,9 @@
    is
       pragma Unreferenced (Stack_Address);
 
-      --  RTEMS has a routine to check this.  So use it.
-      function rtems_stack_checker_is_blown return Interfaces.C.int;
+      --  RTEMS has a routine to check if the stack is blown.
+      --  It returns a C99 bool.
+      function rtems_stack_checker_is_blown return 
Interfaces.C.unsigned_char;
       pragma Import (C,
          rtems_stack_checker_is_blown, "rtems_stack_checker_is_blown");

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill@OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985




More information about the Gcc-patches mailing list