function attribute const

Tony Finch dot@dotat.at
Wed Mar 13 06:29:00 GMT 2002


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.



More information about the Gcc mailing list