This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH]: __attribute__((deprecated))


On Dec 14, 2001, Ira Ruben <ira@apple.com> wrote:

> 1. typedef int T1 __attribute__ ((deprecated));
> 2. T1 x;
> 3. typedef T1 T2;
> 4. T2 y;
> 5. typedef T2 T3 __attribute__ ((deprecated));
> 6. T3 z __attribute__ ((deprecated));

> no warning is issued
> for line 5 even though T3 is defined in terms of deprecated T2
> because T3 itself is being explicitly deprecated.

How about:

typedef T2 T4;

IMO, it shouldn't generate a warning, because I'm not using anything
that is explicitly deprecated.  It may well be that, whenever T1 is
removed, T2 is going to be defined to something else.  Otherwise, IMO,
it should be explicitly marked as deprecated.  In fact, I'd prefer if
4. didn't generate a warning.

Thoughts?

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]