User account creation filtered due to spam.
Created attachment 23939 [details]
% uname -a
Linux hush 2.6.32-5-amd64 #1 SMP Wed Jan 12 03:40:32 UTC 2011 x86_64 GNU/Linux
% gcc-4.6 --version
gcc-4.6 (Debian 4.6.0-2) 4.6.1 20110329 (prerelease)
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
% cat foo.c
int bar(int r, int var)
if (setjmp(env) == 0)
% gcc-4.6 -Wall -Wextra -O2 -c foo.c
foo.c: In function ‘bar’:
foo.c:6:13: warning: argument ‘r’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered]
If I understand this message correctly, GCC is warning me that "r" might be reset to the value it had before calling setjmp(). However, I never changed the value of "r", so I don't think this warning should be emitted.
Note that removing the "if (var) return r;" lines makes the warning go away.
This works OK with 4.8 and 5.1, so not an issue anymore as far as I'm concerned.
(Might be related to #48968 which is reported as "half-fixed" -- I haven't tried.)