public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "amylaar at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/29487] Shared libstdc++ fails to link Date: Mon, 05 Feb 2007 19:26:00 -0000 [thread overview] Message-ID: <20070205192642.7054.qmail@sourceware.org> (raw) In-Reply-To: <bug-29487-276@http.gcc.gnu.org/bugzilla/> ------- Comment #24 from amylaar at gcc dot gnu dot org 2007-02-05 19:26 ------- (In reply to comment #18) > It was argued in PR 29323 that it was incorrect to mark functions > that don't bind locally with TREE_NOTHROW. > > I'm not sure whether it's valid at the language level to replace > a function that can't throw with one that can. Remember that the determination if the function can throw or not is made by analyzing the rtl of the function. I.e. there might have been a throw statement in the source, which was optimized away, so that the compiler can then determine that the function does not actually throw. Thus, TREE_NOTHROW can depend on how good the compiler is at solving specific instances of the halting problem. These might involve mathematical theorems that are yet unproven, but might be in the future so that a funture compiler can make use of it. Thus, if you require that a function that can't throw can't be replaced by one that can, you won't be able to decide if the program is valid till the mathematical theorem is either proven or disproven. Moreover, if, as the languguage level, you consider the C or C++ standard, we can't actually replace functions in first place. If that is what you want, you can use the appropriate visibility attribute in the delacation, and save a lot of overhead for each function call. If you want the function to be replacable, but don;t want the overhead of it being consider potentially throwing, you can again express this with the appropriate attribute in the declaration. > > > Assuming that the changes in TREE_NOTHROW and emission of exception > > information make sense, what solution would you implement for HP-UX 10? If the affected library functions in fact are not supposed to be replaced by functions that can throw, adding declarations with nothrow attribute will get you the performance back for the callers. It would also solve the immediate problem of the excess EH information for the function definitions, although I agree that we generally shouldn't emit it when we can reasonably determine that the actual function definition doesn't throw, even when the declaration says that it may. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29487
next prev parent reply other threads:[~2007-02-05 19:26 UTC|newest] Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top 2006-10-16 22:43 [Bug target/29487] New: " danglin at gcc dot gnu dot org 2006-10-16 23:11 ` [Bug target/29487] " danglin at gcc dot gnu dot org 2006-10-19 1:04 ` danglin at gcc dot gnu dot org 2006-11-13 2:25 ` danglin at gcc dot gnu dot org 2006-11-13 2:37 ` pinskia at gcc dot gnu dot org 2006-11-13 3:09 ` dave at hiauly1 dot hia dot nrc dot ca 2006-11-19 21:55 ` dave at hiauly1 dot hia dot nrc dot ca 2006-12-04 1:29 ` dave at hiauly1 dot hia dot nrc dot ca 2007-02-03 1:54 ` danglin at gcc dot gnu dot org 2007-02-03 2:08 ` pinskia at gcc dot gnu dot org 2007-02-03 2:47 ` dave at hiauly1 dot hia dot nrc dot ca 2007-02-03 2:50 ` dave at hiauly1 dot hia dot nrc dot ca 2007-02-04 22:53 ` mark at codesourcery dot com 2007-02-05 0:15 ` dave at hiauly1 dot hia dot nrc dot ca 2007-02-05 3:06 ` mark at codesourcery dot com 2007-02-05 4:02 ` dave at hiauly1 dot hia dot nrc dot ca 2007-02-05 5:40 ` mark at codesourcery dot com 2007-02-05 9:06 ` rguenth at gcc dot gnu dot org 2007-02-05 9:07 ` rguenth at gcc dot gnu dot org 2007-02-05 9:22 ` bonzini at gnu dot org 2007-02-05 18:34 ` amylaar at gcc dot gnu dot org 2007-02-05 19:26 ` amylaar at gcc dot gnu dot org [this message] 2007-02-05 19:33 ` mark at codesourcery dot com 2007-02-05 19:36 ` amylaar at gcc dot gnu dot org 2007-02-05 19:52 ` amylaar at gcc dot gnu dot org 2007-02-05 20:08 ` mark at codesourcery dot com 2007-02-06 8:27 ` paolo dot bonzini at lu dot unisi dot ch 2007-02-06 8:37 ` bonzini at gnu dot org 2007-02-06 9:27 ` rguenth at gcc dot gnu dot org 2007-02-06 10:18 ` amylaar at gcc dot gnu dot org 2007-02-06 10:39 ` rguenth at gcc dot gnu dot org 2007-02-06 10:42 ` bonzini at gnu dot org 2007-02-06 11:10 ` amylaar at gcc dot gnu dot org 2007-02-06 11:17 ` amylaar at gcc dot gnu dot org 2007-02-06 14:13 ` dave at hiauly1 dot hia dot nrc dot ca 2007-02-06 21:18 ` dave at hiauly1 dot hia dot nrc dot ca 2007-02-09 2:53 ` mmitchel at gcc dot gnu dot org 2007-02-10 1:02 ` mmitchel at gcc dot gnu dot org 2007-02-10 1:13 ` mmitchel at gcc dot gnu dot org 2007-02-11 18:58 ` mmitchel at gcc dot gnu dot org 2007-02-11 19:20 ` mmitchel 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=20070205192642.7054.qmail@sourceware.org \ --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).