As others have pointed out, sizeof () can take any valid identifier, but does not return the correct (honestly true and valid) result for function names. In addition, it definitely may or may not lead to the "demon nose" syndrome.
If you want to profile the size of your program function, check the linker map, which can be found in the intermediate directory of results (the one where things are compiled into .obj / .o or where the resulting image / executable file is located). Sometimes it is possible to generate or not this map file ... it depends on the compiler / linker.
If you need the size of a function pointer, they have the same size, the size of the address word on your processor.
jpinto3912 04 Sep '12 at 8:27 2012-09-04 08:27
source share