public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/12285] New: Add sizeof_function functionality
@ 2003-09-15  8:52 mkgnu at gmx dot net
  2003-09-18  7:34 ` [Bug middle-end/12285] " pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: mkgnu at gmx dot net @ 2003-09-15  8:52 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12285

           Summary: Add sizeof_function functionality
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mkgnu at gmx dot net
                CC: gcc-bugs at gcc dot gnu dot org

I am requesting the feature of adding a means of computing the size of a
function at run time. 

This is currently accomplished using something similar to...

#define END_OF_FUNCTION(name) void name##_end(void) { }
#define END_OF_STATIC_FUNCTION(name) static void name##_end(void) { }

void func1(void) { ... } END_OF_FUNCTION(func1);
void func2(void) { ... } END_OF_FUNCTION(func2);

...and then manually computing &function_end - &function_name + 1

However this approach cannot be used for computing the size of ANY function
unless all functions are defined that way, which makes it "difficult" to deal
with large scale projects (e.g. linux kernel).

Discussions regarding this feature can be found at:

http://gcc.gnu.org/ml/gcc-help/2003-07/msg00067.html

Please contact me for more information.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-04-27 18:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-15  8:52 [Bug c/12285] New: Add sizeof_function functionality mkgnu at gmx dot net
2003-09-18  7:34 ` [Bug middle-end/12285] " pinskia at gcc dot gnu dot org
2003-09-18 16:03 ` mkgnu at gmx dot net
2003-09-19  6:27 ` wilson at specifixinc dot com
2003-09-19  9:52 ` mkgnu at gmx dot net
2004-01-01  1:04 ` pinskia at gcc dot gnu dot org
2004-01-01 19:16 ` mkgnu at gmx dot net
2004-04-27 19:05 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).