View Issue Details

IDProjectCategoryView StatusLast Update
0000880LDMud 3.6LPC Compiler/Preprocessorpublic2020-09-01 20:38
Reporterzesstra Assigned ToGnomi  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platformx86_64OSGNU/LinuxOS Version0
Product Version3.6.2 
Target Version3.6.3Fixed in Version3.6.3 
Summary0000880: Repeated calls to undefined function trigger warning due to strict_types without strict_types being in effect.
DescriptionWhen calling an undefined function twice (!) as part of an expression in the arguments to a callother, in addition to the error message "Undefined function ...", the warning "Function call result must be casted due to pragma strict_types" ist triggered.

Compiling this code fragment:
int seite;

mixed test()
{
  this_player()->more(buchdir()+"seite"+seite);
  this_player()->more(buchdir()+"titel");
  return 1;
}

causes the errors:
players/zesstra/foo.c line 5 before '+"seite"+s': Undefined function 'buchdir'
players/zesstra/foo.c line 6 before '+"titel");': Function buchdir undefined
players/zesstra/foo.c line 6 before ';': Function call result must be casted due to pragma strict_types

This is certainly confusing. However, I am not sure, whether it warrants fixing since compiler errors after the first one are often not reliable.
TagsNo tags attached.

Activities

Gnomi

2020-07-28 15:15

manager   ~0002536

https://github.com/amotzkau/ldmud/commit/826bf5bdecea904face452b6df006fe542958d8f

zesstra

2020-07-28 21:25

administrator   ~0002537

Ah, yes. Makes sense. I cherry-picked it into the driver we will use tomorrow for reboot.

Rastullah

2020-08-06 13:29

reporter   ~0002540

Executing the following code reproduces the issue as well:

create()
{
  unknown_function(this_object());
}

testfun()
{
  return (!unknown_function(previous_object()));
}

zesstra

2020-08-06 17:11

administrator   ~0002541

It should be noted, that this is with a driver containing the commit https://github.com/amotzkau/ldmud/commit/826bf5bdecea904face452b6df006fe542958d8f

Gnomi

2020-08-06 17:54

manager   ~0002542

Improved commit: https://github.com/amotzkau/ldmud/commit/055f19c9fef3388f812fbe1f51e24c16ea5ad7a5

Issue History

Date Modified Username Field Change
2020-07-27 23:22 zesstra New Issue
2020-07-28 15:15 Gnomi Assigned To => Gnomi
2020-07-28 15:15 Gnomi Status new => assigned
2020-07-28 15:15 Gnomi Note Added: 0002536
2020-07-28 21:25 zesstra Note Added: 0002537
2020-08-06 13:29 Rastullah Note Added: 0002540
2020-08-06 17:11 zesstra Note Added: 0002541
2020-08-06 17:54 Gnomi Note Added: 0002542
2020-09-01 20:38 Gnomi Status assigned => resolved
2020-09-01 20:38 Gnomi Resolution open => fixed
2020-09-01 20:38 Gnomi Fixed in Version => 3.6.3