This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, lynxos] Fix warning in config/i386/lynx.h
- From: Adam Nemet <anemet at lnxw dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 11 Sep 2004 23:49:49 -0700
- Subject: [PATCH, lynxos] Fix warning in config/i386/lynx.h
Hi,
With the patch below i386-lynx-lynxos bootstraps. PowerPC still has
some issues.
OK to apply?
2004-09-11 Adam Nemet <anemet@lnxw.com>
* config/i386/lynx.h (DBX_REGISTER_NUMBER): Fix warning. Always
return signed int.
Index: lynx.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/lynx.h,v
retrieving revision 1.10
diff -u -p -r1.10 lynx.h
--- lynx.h 5 Aug 2004 04:55:36 -0000 1.10
+++ lynx.h 12 Sep 2004 06:27:22 -0000
@@ -39,7 +39,9 @@ Boston, MA 02111-1307, USA. */
#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
-/* LynxOS's GDB counts the floating point registers from 16. */
+/* LynxOS's GDB counts the floating point registers from 16. Although
+ N can be signed or unsigned always evaluate to signed to avoid
+ warnings. */
#undef DBX_REGISTER_NUMBER
#define DBX_REGISTER_NUMBER(n) \
@@ -52,7 +54,7 @@ Boston, MA 02111-1307, USA. */
: (n) == 5 ? 7 \
: (n) == 6 ? 5 \
: (n) == 7 ? 4 \
- : ((n) >= FIRST_STACK_REG && (n) <= LAST_STACK_REG) ? (n) + 8 \
+ : ((n) >= FIRST_STACK_REG && (n) <= LAST_STACK_REG) ? (int) (n) + 8 \
: (-1))
/* A C statement to output to the stdio stream FILE an assembler