public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "spark at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/31367] Should not warn about use of deprecated type in deprecated struct
Date: Mon, 26 Mar 2007 23:57:00 -0000	[thread overview]
Message-ID: <20070326235657.5026.qmail@sourceware.org> (raw)
In-Reply-To: <bug-31367-1313@http.gcc.gnu.org/bugzilla/>



------- 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


  parent reply	other threads:[~2007-03-26 23:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-26 18:39 [Bug c++/31367] New: " ian at airs dot com
2007-03-26 18:43 ` [Bug c/31367] " pinskia at gcc dot gnu dot org
2007-03-26 20:27 ` david at luyer dot net
2007-03-26 23:57 ` spark at gcc dot gnu dot org [this message]
2010-05-18  7:15 ` ethouris at gmail dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070326235657.5026.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).