The warning 
     argument 'obj' might be clobbered by 'longjmp' or 'vfork' 
does not take into account the facts that 
     1) When longjmp() is called, setjmp() returns a non-null value, 
     2) In this case, when setjmp() returns a non-null value, 'obj' is 
        reset before being used. 
 
$ gcc -v 
Using built-in specs. 
Target: powerpc-apple-darwin7.8.0 
Configured with: /Users/bruno/data/work/gcc-4.0.0-20050410/configure 
--prefix=/Volumes/UserData/experimental-macos --enable-shared 
--enable-version-specific-runtime-libs --enable-languages=c,c++ 
Thread model: posix 
gcc version 4.0.0 20050410 (prerelease) 
$ gcc -W -O -c bug.c  
bug.c: In function 'update_instance': 
bug.c:220: warning: argument 'obj' might be clobbered by 'longjmp' or 'vfork' 
 
Expected: no warning.

-- 
           Summary: "clobbered by longjmp" warning ignores the data flow
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bruno at clisp dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: powerpc-apple-darwin7.8.0
  GCC host triplet: powerpc-apple-darwin7.8.0
GCC target triplet: powerpc-apple-darwin7.8.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21161

Reply via email to