This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
function attribute const
- From: Tony Finch <dot at dotat dot at>
- To: gcc at gcc dot gnu dot org
- Cc: dot at dotat dot at
- Date: Wed, 13 Mar 2002 14:29:36 +0000
- Subject: function attribute const
The gcc info page says
Note that a function that has pointer arguments and examines the
data pointed to must _not_ be declared `const'.
If the programmer knows that the data structures which a function
examines will not change from one invocation of the function to
another, why can't the function be declared const?
Tony.