sizeof(function) - preproposal survey

George Kyriazis kyriazis at pawl11.pawl.rpi.edu
Sat Feb 20 15:49:09 AEST 1988


In article <1077 at dutesta.UUCP> pjb at dutesta.UUCP (P.J. Brand) writes:
>From article <11801 at brl-adm.ARPA>, by LINNDR%VUENGVAX.BITNET at CUNYVM.CUNY.EDU:
>> I need some help from the readers of comp.lang.c/info-c in preparation
>> for making a proposal to X3J11. The gist of my proposal is that the
>> sizeof operator, when applied to a function name, would return the
>> length of the function rather than the size of a pointer to a function.
>> 
>
>Well I wouldn't know of any code that would get into trouble, but
>what the ?!#??? should you want to do with the length of a function??
>
  It is *not* useless.  I wanted to get the sizeof() a function when I was
writing a program for the PC. Concider writing device drivers and keeping
them in a file.  The application program can then read the sizeof() the 
function and then read() the function.  On the developers point of view having
a sizeof(f()) option will make life a lot easier.  Write the function, debug
it, and then compile it together with a program that gets the function's size
and write()'s it to a file.  Any comments??


*******************************************************
*George C. Kyriazis                                   *    Gravity is a myth
*userfe0e at mts.rpi.edu or userfe0e at rpitsmts.bitnet     *        \    /
*Electrical and Computer Systems Engineering Dept.    *         \  /
*Rensselear Polytechnic Institute, Troy, NY 12180     *          ||
*******************************************************      Earth sucks.



More information about the Comp.lang.c mailing list