Hi,

I just noticed that CIL (the git develop branch version) messes up 
functions if the function definition is followed by a function prototype 
that uses different names for parameters. CIL replaces the actual 
function parameter names with the parameter names of the prototype. 
Please see the following example...

input:
--------------------------
int foo(int a, int b)
{
   return a + b;
}
int foo(int aa, int bb);
--------------------------

CIL output
--------------------------
int foo(int aa , int bb )
{
   {
   return (a + b);
}
}
--------------------------

So there is a mismatch of the parameter names in the function definition 
and the function head. I encountered this issue when playing around with 
the Linux kernel, where a prototype with mismatching function parameter 
names sometimes follows a function definition. GCC does not mind the 
different parameter names and just seems to ignore the late prototype.

Is the CIL behavior a bug that should be fixed?

Cheers
Oliver

------------------------------------------------------------------------------
_______________________________________________
CIL-users mailing list
CIL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cil-users

Reply via email to