public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Matthias Klose <doko@net.local> To: gcc-gnats@gcc.gnu.org, debian-gcc@lists.debian.org Subject: optimization/9079: Inline constant function pointers Date: Sat, 28 Dec 2002 03:26:00 -0000 [thread overview] Message-ID: <E18SEwZ-0007hU-00@tango.net.local> (raw) >Number: 9079 >Category: optimization >Synopsis: Inline constant function pointers >Confidential: no >Severity: non-critical >Priority: low >Responsible: unassigned >State: open >Class: change-request >Submitter-Id: net >Arrival-Date: Sat Dec 28 03:26:05 PST 2002 >Closed-Date: >Last-Modified: >Originator: Ian Turner <vectro@pipeline.com> >Release: 3.2.1 (Debian) (Debian unstable) >Organization: The Debian Project >Environment: System: Debian GNU/Linux (unstable) Architecture: i686 host: i386-linux Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,proto,pascal,objc,ada --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.2 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-java-gc=boehm --enable-objc-gc i386-linux Thread model: posix gcc version 3.2.2 20021212 (Debian prerelease) >Description: [ Reported to the Debian BTS as report #173513. Please CC 173513@bugs.debian.org on replies. Log of report can be found at http://bugs.debian.org/173513 ] Currently GCC will not inline a call of a function pointer that is known at compile time. For example, the following code will still result in the instruction "call funk" when run with -finline-functions on i386: #include <stdio.h> static char* funk() { return "Hello World.\n"; } static void funky(char*(*func)()) { printf("%s", func()); } void main() { funky(funk); } Although the call to funky is inlined, the call to funk is not, because in the source code it appears as a call of a function pointer. But as a consequence of funky being inlined, it would be possible to inline funk as well. >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted:
next reply other threads:[~2002-12-28 11:26 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-12-28 3:26 Matthias Klose [this message] 2003-03-22 18:24 bangerth
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=E18SEwZ-0007hU-00@tango.net.local \ --to=doko@net.local \ --cc=173513@bugs.debian.org \ --cc=debian-gcc@lists.debian.org \ --cc=gcc-gnats@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).