Bug 3126 - Strict type warnings when using Gmp.
: Strict type warnings when using Gmp.
Status: RESOLVED FIXED
: Pike
Compiler
: 7.5
: All All
: P3 (normal) minor
: ---
Assigned To:
:
:
:
  Show dependency treegraph
 
Reported: 2002-06-02 02:35 CET by
Modified: 2002-07-09 19:04 CET (History)
Scrum Prio:
In scrum?: ---
Story included in sprints:
Unplanned in sprints:


Attachments


Description From 2002-06-02 02:35:39 CET
The following code

#pragma strict_types
int main() {
  object x = Gmp;
}

produces the following output

-:1: Warning: Function type mismatch
-:1: Warning: Expected: function(mixed : int)
-:1: Warning: Got     : function(object | float | int : int)
-:1: Warning: Function type mismatch
-:1: Warning: Expected: function(mixed : int)
-:1: Warning: Got     : function(object | float | int : int)
-:1: Warning: Function type mismatch
-:1: Warning: Expected: function(mixed : int)
-:1: Warning: Got     : function(object | float | int : int)
-:1: Warning: Function type mismatch
-:1: Warning: Expected: function(mixed : int)
-:1: Warning: Got     : function(object | float | int : int)
-:1: Warning: Function type mismatch
-:1: Warning: Expected: function(mixed : int)
-:1: Warning: Got     : function(object | float | int : int)
-:1: Warning: Function type mismatch
-:1: Warning: Expected: function(mixed : int)
-:1: Warning: Got     : function(object | float | int : int)
-:1: Warning: Function type mismatch
-:1: Warning: Expected: function(mixed : int)
-:1: Warning: Got     : function(int | float | object : int)
-:1: Warning: Function type mismatch
-:1: Warning: Expected: function(mixed : int)
-:1: Warning: Got     : function(int | float | object : int)
-:1: Warning: Function type mismatch
-:1: Warning: Expected: function(mixed : int)
-:1: Warning: Got     : function(int | float | object : int)
-:1: Warning: Function type mismatch
-:1: Warning: Expected: function(mixed : int)
-:1: Warning: Got     : function(int | float | object : int)
-:1: Warning: Function type mismatch
-:1: Warning: Expected: function(mixed : int)
-:1: Warning: Got     : function(int | float | object : int)
-:1: Warning: Function type mismatch
-:1: Warning: Expected: function(mixed : int)
-:1: Warning: Got     : function(int | float | object : int)
------- Comment #1 From 2002-07-09 18:47:43 CET -------
The warnings seem to come from the lfun type verification.
------- Comment #2 From 2002-07-09 18:51:04 CET -------
-:1: Warning: Type mismatch for callback function `>():
-:1: Warning: Expected: function(mixed : int)
-:1: Warning: Got     : function(object | float | int : int)
-:1: Warning: Type mismatch for callback function `<():
-:1: Warning: Expected: function(mixed : int)
-:1: Warning: Got     : function(object | float | int : int)
-:1: Warning: Type mismatch for callback function `==():
-:1: Warning: Expected: function(mixed : int)
-:1: Warning: Got     : function(object | float | int : int)
-:1: Warning: Type mismatch for callback function `>():
-:1: Warning: Expected: function(mixed : int)
-:1: Warning: Got     : function(object | float | int : int)
-:1: Warning: Type mismatch for callback function `<():
-:1: Warning: Expected: function(mixed : int)
-:1: Warning: Got     : function(object | float | int : int)
-:1: Warning: Type mismatch for callback function `==():
-:1: Warning: Expected: function(mixed : int)
-:1: Warning: Got     : function(object | float | int : int)
-:1: Warning: Type mismatch for callback function `>():
-:1: Warning: Expected: function(mixed : int)
-:1: Warning: Got     : function(int | float | object : int)
-:1: Warning: Type mismatch for callback function `<():
-:1: Warning: Expected: function(mixed : int)
-:1: Warning: Got     : function(int | float | object : int)
-:1: Warning: Type mismatch for callback function `==():
-:1: Warning: Expected: function(mixed : int)
-:1: Warning: Got     : function(int | float | object : int)
-:1: Warning: Type mismatch for callback function `>():
-:1: Warning: Expected: function(mixed : int)
-:1: Warning: Got     : function(int | float | object : int)
-:1: Warning: Type mismatch for callback function `<():
-:1: Warning: Expected: function(mixed : int)
-:1: Warning: Got     : function(int | float | object : int)
-:1: Warning: Type mismatch for callback function `==():
-:1: Warning: Expected: function(mixed : int)
-:1: Warning: Got     : function(int | float | object : int)
------- Comment #3 From 2002-07-09 19:05:56 CET -------
The problem was that the comparison LFUNs in the Gmp module didn't accept all
kinds of input.

Fixed.

Note

You need to log in before you can comment on or make changes to this bug.