This is the mail archive of the gcc-patches@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]

Re: Patch installed for constification


Neil Booth <neil@daikokuya.demon.co.uk> writes:

|> Kaveh R. Ghazi wrote:-
|> 
|> > I found a lot of places where "const char *" could instead be
|> > tightened up as "const char *const".
|> 
|> Is this useful and worth it?  To me, the value of constness tends to
|> come from being a pointer to const, and not from being a const
|> pointer.

For automatic variables, I agree.  But for static variables it may be a
win since they can go to the rodata section.

Andreas.

-- 
Andreas Schwab                                  "And now for something
Andreas.Schwab@suse.de				completely different."
SuSE Labs, SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5


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