This is the mail archive of the gcc-bugs@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]

[Bug c++/68954] [5/6 Regression] -Wdeprecated-declarations -Werror errors for system header templates


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68954

--- Comment #6 from rguenther at suse dot de <rguenther at suse dot de> ---
On Thu, 17 Dec 2015, manu at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68954
> 
> --- Comment #4 from Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> ---
> (In reply to Richard Biener from comment #0)
> > std::auto_ptr is marked as deprecated in
> > libstdc++-v3/include/backward/auto_ptr.h
> > and
> > 
> > #include <memory>
> > 
> > int main()
> > {
> >   int i;
> >   std::auto_ptr<int> x;
> > }
> > 
> > warns about this even without -Wsystem-headers.  What is worse, since GCC 5.3
> 
> Perhaps something changed in the location passed to the warning? Or there
> should be an explicit check of whether the location of the declaration is at a
> system header.
> 
> > adding -Werror makes this an error while with 5.2 it was a warning despite
> > -Werror:
> 
> Sorry, how is this a bug and not simply working as intended?

I just wanted clarification for that.  Yes, it looks like it now works
as intended but it makes packages that previously build fine with -Werror
fail now when updating from GCC 5.2 to 5.3.

I agree the new behavior makes sense but I wondered if it was 
intentionally that for warnings enabled by default (no -W*) we
continue issueing a warning rather than an error with -Werror.

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