This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
why are we not using const?
- From: "Manuel LÃpez-IbÃÃez" <lopezibanez at gmail dot com>
- To: gcc at gnu dot org
- Date: Tue, 27 Jun 2006 13:51:16 +0100
- Subject: why are we not using const?
Dear all,
from comments in the #gcc irc channel, I understood that it is not
advisable for gcc patches to use the const qualifier in function
prototypes. I would like to understand why. Apart from its main
purpose, I believed that the use of 'const' helps the compiler to
optimise the code. Of course, I must be wrong, or the gains must be
very small compared with the reasons for not using 'const', which I
ignore.
Again, I am not proposing using 'const' or changing all the code. I am
just asking the reasons for not using 'const' in order to learn more.
Thanks in advance,
Manuel.
http://gcc.gnu.org/wiki/Wcoercion