Sun Sep 13 20:29:39 1992 Ian Lance Taylor (ian@cygnus.com)
[deliverable/binutils-gdb.git] / gas / config / obj-coffbfd.c
index 1f59b558ccb32718f829db90d62212737ef3af3c..b66269cca813b9a054c07c9c55a9cefb1d942854 100644 (file)
@@ -2262,6 +2262,17 @@ segT             this_segment_type)
                        as_bad("Value of %d too large for field of %d bytes at 0x%x",
                               add_number, size, fragP->fr_address + where);
                    }           /* generic error checking */
+#ifdef WARN_SIGNED_OVERFLOW_WORD
+               /* Warn if a .word value is too large when treated as
+                  a signed number.  We already know it is not too
+                  negative.  This is to catch over-large switches
+                  generated by gcc on the 68k.  */
+               if (! flagseen['J']
+                   && size == 2
+                   && add_number > 0x7fff)
+                 as_bad ("Signed .word overflow; switch may be too large; %d at 0x%x",
+                         add_number, fragP->fr_address + where);
+#endif
            }                   /* not a bit fix */
        /* once this fix has been applied, we don't have to output anything 
           nothing more need be done -*/
This page took 0.023387 seconds and 4 git commands to generate.