php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47902 free_op1 warnings
Submitted: 2009-04-05 17:23 UTC Modified: 2009-04-14 01:00 UTC
Votes:13
Avg. Score:1.2 ± 0.6
Reproduced:1 of 2 (50.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: pierre dot php at gmail dot com Assigned: dmitry (profile)
Status: No Feedback Package: Compile Warning
PHP Version: 5.3CVS-2009-04-05 (snap) OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: pierre dot php at gmail dot com
New email:
PHP Version: OS:

 

 [2009-04-05 17:23 UTC] pierre dot php at gmail dot com
Description:
------------
zend\zend_vm_execute.h(17488) : warning C4101: 'free_op1' : unreferenced local variable

dozen of times, the generation script could be fixed to silent them.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-04-06 11:25 UTC] dmitry@php.net
These warnings occurs because of inaccurate C compiler behaviour.
In case you look into zend\zend_vm_execute.h(17488) and the whole function, you would see that free_op1 is used in this function, however the code which references the variable is unreachable.

A general solution to eliminate such warnings would require parsing of C source code. I don't think it make sense to invest time into it to just to remove warnings.
 [2009-04-06 11:37 UTC] pajoye@php.net
It is not that important to fix, you asked me to open a bug about it :)

However, there is no inaccurate behavior, if the code using this variable is unreachable, then the variable is not used at all (typically if (0) will striped out).
 [2009-04-06 13:54 UTC] kalle@php.net
Dmitry, I looked at the MSDN for C4101 for example:

struct a {
 static int b() {
  return 1;
 }
};

int main() {
 A c;
 int d = c.func();

 return d;
}

The "A c;" line generates a C4101 because b is a static function and therefore no instance is needed to call it, in C++ that would mean main should looks like:

int main() {
 int d = A::func();

 return d;
}


Its documentation is at:
http://msdn.microsoft.com/en-us/library/c733d5h9(VS.80).aspx
 [2009-04-14 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 15:01:28 2024 UTC