Clarification on section variable attribute usage [try #2]
Ian Lance Taylor
iant@google.com
Tue Dec 11 16:17:00 GMT 2007
Please never send a message to both gcc@gcc.gnu.org and
gcc-help@gcc.gnu.org. Thanks. I've dropped gcc@gcc.gnu.org from this
reply.
Franck Bui-Huu <vagabon.xyz@gmail.com> writes:
> Since at least 3.4, the GCC manual says:
>
> Use the `section' attribute with an _initialized_ definition of a
> _global_ variable, as shown in the example. GCC issues a warning
> and otherwise ignores the `section' attribute in uninitialized
> variable declarations.
>
> but this doesn't seem correct.
Yes, I'm fairly sure that is no longer correct. gcc is now smart
enough to not treat a variable with a section attribute as a common
variable. I think the documentation is simply wrong.
Ian
More information about the Gcc-help
mailing list