This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/68954] [5/6 Regression] -Wdeprecated-declarations -Werror errors for system header templates
- From: "rguenther at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 18 Dec 2015 09:01:19 +0000
- Subject: [Bug c++/68954] [5/6 Regression] -Wdeprecated-declarations -Werror errors for system header templates
- Auto-submitted: auto-generated
- References: <bug-68954-4 at http dot gcc dot gnu dot org/bugzilla/>
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.