Carl Lowenstein wrote:
Where does one learn that this attribute exists, except by searching
the archives of <[EMAIL PROTECTED]> with some assistance from Google?
__attribute__((used))
By actually reading/searching the documentation perchance?
This would have been one of my first hunting points along with pragma.
This is what you have to do with structure packing.
The gcc folks have become increasingly prickly about special casing
behavior that they don't have to because it almost always leads to bugs.
Perhaps they have lost track of the principle of least surprise.
Um, what is "least surprising" about having an unused string not get
optimized when the optimizer specifically says it optimizes out unused
strings? And, what do you propose as "correct" behavior? Never
optimize unused static strings? Clearly *that's* a bug. Optimize all
static strings except those named SCCSId? Oh, please, no. And,
besides, maybe other projects don't want their VCS strings cluttering
their binaries. What makes *your* opinion the correct one?
It is not the job of the gcc folks to never change what their compiler
does. This is doubly so for behavior that is a *bug*. gcc never did
guarantee bug compatibility. And, given the amount of whining they have
to put up with about this kind of stuff, I'm inclined to let them be a
little cranky.
If you don't want change, why did you upgrade?
-a
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg