This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Writing to 'const' variables is allowed?



Hi all,
This is my first post to the list. My name is
Ciaran O'Riordan and I am writing a book on 'GNU C'.
(License is GNU FDL).

I've been testing a lot of things but was surprised
to find that I could write to 'const' variables of
both local and extern scope. I did recieve a
warning message but was expecting an error. Could
anyone tell me why this is allowed?

Thanks.


_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]