Type gets lost on inlining
|
|
Bugzilla Link |
986 |
Created on |
Jun 20, 2012 21:58 |
Version |
svn |
OS |
Linux |
Architecture |
PC |
Attachments |
tutu2, tutu1
|
Extended Description
This happens on this code:
ABORT: line 87 file: ipbbAKD.sac
ABORT: Cannot infer type of "n" as it corresponds to "..." return type --
ABORT: missing type declaration
looking at this:
_pinl_3272_junk, n = String::sscanf( _pinl_3271__flat_76, _pinl_3270__flat_78) ;
The relevant source code is:
use CommandLine: all;
use String: {to_string,tochar,sscanf};
#ifdef FIXED
#else //FIXED
inline
#endif // FIXED
int scanme(int n)
{
int z;
junk, z = sscanf(argv(1), "%d");
return(z);
}
int main()
{
n = 4.5;
z = scanme(1);
StdIO::print(z);
return( 0);
}
Compiling with sac2c -DFIXED works OK.