This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Fix ia64 gcc warnings


On Wed, 2005-11-02 at 09:13, H. J. Lu wrote:
> On Linux/ia64, I got warnings like
> /net/gnu-13/export/gnu/src/binutils-import/binutils/opcodes/m68k-dis.c:
> In function `print_insn_m68k':
> /net/gnu-13/export/gnu/src/binutils-import/binutils/opcodes/m68k-dis.c:1354:
> warning: variable 'buffer' might be clobbered by `longjmp' or `vfork'
> make[6]: *** [m68k-dis.lo] Error 1 

This is unlikely to be an IA-64 problem.  This would more likely be a
gcc version problem, and you didn't mention what gcc version you are
using.

I was able to reproduce this with gcc-2.96 and gcc-3.0.  I can not
reproduce this with gcc-3.3 or gcc-4.1.  It looks like this was a bug in
old gcc versions that was fixed years ago.

The code is actually OK, because if setjmp returns we immediately exit
the function, and hence no local variables are used after the longjmp
returns.

If you really need to use old broken gcc releases to compile binutils,
then this patch looks OK to me.  I'd strongly suggest using a better gcc
version though, as you are likely to run into more problems if you keep
using out-of-date gcc versions to compile current binutils sources.
-- 
Jim Wilson, GNU Tools Support, http://www.specifix.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]