public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "mkgnu at gmx dot net" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/12285] Add sizeof_function functionality Date: Thu, 01 Jan 2004 19:16:00 -0000 [thread overview] Message-ID: <20040101191632.2803.qmail@sources.redhat.com> (raw) In-Reply-To: <20030915054549.12285.mkgnu@gmx.net> ------- Additional Comments From mkgnu at gmx dot net 2004-01-01 19:16 ------- Reopened bug. Again, I will have to disagree and ask that this bug is assigned the minimum priority and remain open. By your same argument, there is no need for the "&" C operator. You should be using asm to get the memory address of the beginning of a function, or variable location. Having this feature will allow C programs to self-discover the size of their functions. They can become introspective. It _IS_ possible to use a function attribute that will generate an end_label at the end of each function so that one can compute the size of a function during compile-time. You can emit the following asm using this C program: int func() { printf("The size of this function is 0x%lx\n", size_of_function(func)); } func: ... push func_end_label-func call printf ... func_end_label: GCC itself can emit this, with no modifications needed to as or ld. The fact that the workaround I use so far is a macro, proves that. -- What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |UNCONFIRMED Resolution|INVALID | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12285
next prev parent reply other threads:[~2004-01-01 19:16 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-09-15 8:52 [Bug c/12285] New: " 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 [this message] 2004-04-27 19:05 ` pinskia at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20040101191632.2803.qmail@sources.redhat.com \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).