On Fri, Jun 10, 2005 at 10:50:01AM -0400, DJ Delorie wrote:
> typedef int __attribute__((section("foo"))) FOOINT;
>
> FOOINT a;
>
> Would it make sense to allow this sort of thing?
No more than it would make sense to have
typedef static int FOOINT;
IMO.
r~
On Fri, 10 Jun 2005, DJ Delorie wrote:
> What about this scenario?
>
> typedef int __attribute__((section("foo"))) FOOINT;
>
> FOOINT a;
>
> Would it make sense to allow this sort of thing? Would it be feasible
> to implement?
It might make sense to define "section" as applying to the type -
> The various exceptions of the form "if an attribute is applied to the type
> of a decl which can only apply to a decl, then apply it to the decl" are
> there because they represent forms used by existing code.
What about this scenario?
typedef int __attribute__((section("foo"))) FOOINT;
FOO
> most code and GCC documentation uses the less clear do-what-I-mean
> positions instead.
Ok, that's kinda what I figured. Thanks!
On Thu, 9 Jun 2005, DJ Delorie wrote:
>
> > "section" attributes are presently storage-class-like (similar to
> > "static") and only work on declarations.
>
> Ok, I see that we set the "apply to decl" bit for "section". I guess
> the question is - why? Would it be more consistent to keep track
> "section" attributes are presently storage-class-like (similar to
> "static") and only work on declarations.
Ok, I see that we set the "apply to decl" bit for "section". I guess
the question is - why? Would it be more consistent to keep track of
where it is given, and complain if it is applie
On Thu, 9 Jun 2005, DJ Delorie wrote:
>
> Consider:
>
> int __attribute__((section("foo"))) *var1;
> int * __attribute__((section("foo"))) var2;
>
> var2 is itself in section foo, and points to an int.
>
> Isn't var1 a pointer to something in section foo, and not itself in
> foo? GCC instead