[Ilugc] Ansi C and 'const' modifier

  • From: sridharinfinity@xxxxxxxxx (Sridhar R)
  • Date: Wed Aug 11 16:59:56 2004

R Deepak <rdeepak@xxxxxxxxxxxxxxxxxxxx> wrote:

My gcc is

gcc (GCC) 3.3.3 20040412 (Red Hat Linux 3.3.3-7)

And it does give an error on compile about modifying a read-only variable.
Maybe a bug that was fixed?

Yes. In gcc 3.3.4 (here) it's giving error, though the standard left
it as 'undefined'.  Doesn't really matter.

-- 
Sridhar - http://cs.annauniv.edu/~rsridhar
Blog: http://www.livejournal.com/users/sridharinfinity

Other related posts: