Re: Making a struct field constant, when this struct is imported to a particular Cpp files

2009-11-12 Thread Dave Korn
Axel Freyn wrote: > Hi Ansis, > > first: you should use gcc-h...@gcc.gnu.org for questions like this... Indeed. However, from the gcc@ point of view: > Yes, this approach is save. No, not remotely, and everyone on this list already knows why (or ought to after a few moments thought, or el

Re: Making a struct field constant, when this struct is imported to a particular Cpp files

2009-11-12 Thread Axel Freyn
Hi Ansis, first: you should use gcc-h...@gcc.gnu.org for questions like this... On Thu, Nov 12, 2009 at 05:44:58AM -0800, ansis atteka wrote: > I have a struct in a header file. And I would like to have some of this > struct member fields to be constant, in case if this header file is included >

Making a struct field constant, when this struct is imported to a particular Cpp files

2009-11-12 Thread ansis atteka
Greetings, I have a struct in a header file. And I would like to have some of this struct member fields to be constant, in case if this header file is included from some particular Cpp files. Motivation for this is to avoid some silly programmer errors by accidentally writing to this variable, wh