[Ns-developers] Deprecated Attribute?

Gustavo Carneiro gjcarneiro at gmail.com
Tue Jul 22 14:40:38 PDT 2008


2008/7/22 Mathieu Lacage <mathieu.lacage at sophia.inria.fr>:

>
> On Tue, 2008-07-22 at 21:14 +0100, Gustavo Carneiro wrote:
> >
> >
> > 2008/7/22 Mathieu Lacage <mathieu.lacage at sophia.inria.fr>:
> >
> >         On Tue, 2008-07-22 at 12:23 -0700, craigdo at ee.washington.edu
> >         wrote:
> >         > I've been trying to track down when the -Wno-error= feature
> >         became available
> >         > in gcc.  It is not in the gcc 4.1.2 manual.  It is in the
> >         gcc 4.2.4 manual.
> >         > The addition of the feature doesn't appear in the gcc 4.2
> >         release series
> >         > "changes, new features and fixes" documentation, though, but
> >         I do find it in
> >         > an old gcc 4.2.0 warning options page.
> >         >
> >         > I didn't get a reaction when I wrote this in another email;
> >         but it does mean
> >         > that the first time someone actually checks in a change
> >         using the deprecated
> >
> >
> >         We already use it.
> >
> >         > attribute, we effectively set a requirement for gcc >= 4.2.0
> >         on our builds.
> >
> >
> >         We already (thanks gustavo) have logic in place to make the
> >         DEPRECATED
> >         macro a noop with gcc <= 4.1. See check_compilation_flag in
> >         the
> >         top-level wscript.
> >
> > This is true.  But unless I missed something, the code checks if the
> > -Wno-error=... option can be used, but doesn't make DEPRECATED a noop
> > if it cannot be used.  If that is the desired behaviour (and I think
> > it is) then some more simple work is needed on top of that.  I
> > volunteer to take care of it.
>
> I would not mind but I just realized that I don't understand why we are
> using that flag. Why are we actually using
> -Wno-error=deprecated-declarations ?


Because we are using -Werror, which would turn deprecation warnings into
compilation errors.  What would be the point of a deprecation warning if the
build would fail anyway?  Deprecations are meant to warn users they will
have to change their code in a way that does not break the build.

-- 
Gustavo J. A. M. Carneiro
INESC Porto, Telecommunications and Multimedia Unit
"The universe is always one step beyond logic." -- Frank Herbert


More information about the Ns-developers mailing list