This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/28306] const / pure call with ignored argument emitted.
- From: "amylaar at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Jul 2006 16:54:27 -0000
- Subject: [Bug c/28306] const / pure call with ignored argument emitted.
- References: <bug-28306-5394@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from amylaar at gcc dot gnu dot org 2006-07-07 16:54 -------
Created an attachment (id=11850)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11850&action=view)
test case
The available source code for the functions allows the compiler to
see that the called functions are const.
This should be sufficient for the compiler to figure out the call is not
needed.
Likewise, the pure attributes should also be sufficient to figure this out.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28306