------- Comment #3 from spark at gcc dot gnu dot org  2007-03-27 00:56 -------
# cat -n t.c
     1  typedef __attribute__((deprecated)) int foo;
     2  typedef
     3          struct
     4  __attribute__((deprecated))
     5          bar1
     6  {
     7    foo baz;
     8  }
     9  bop1;
    10
    11  typedef
    12  __attribute__((deprecated))
    13          struct
    14          bar2
    15  {
    16    foo baz;
    17  } bop2;
    18
    19  typedef
    20          struct
    21          bar3
    22  {
    23    foo baz;
    24  }
    25  __attribute__((deprecated))
    26  bop3;
    27
    28  typedef
    29          struct
    30          bar4
    31  {
    32    foo baz;
    33  }
    34  bop4
    35  __attribute__((deprecated));
# ~/local/pkg/4.1/bin/gcc -c t.c
t.c:7: warning: 'foo' is deprecated
t.c:9: warning: 'bar1' is deprecated (declared at t.c:6)
t.c:16: warning: 'foo' is deprecated
t.c:23: warning: 'foo' is deprecated
t.c:26: warning: 'bar3' is deprecated (declared at t.c:22)
t.c:32: warning: 'foo' is deprecated
#

I'm not sure what to make of this, 
but there seems to be some subtleties regarding 
which declaration the attribute applies to.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31367

Reply via email to