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++/85464] [7 Regression] Wignored-qualifiers is emitted by cc1plus without diagnostics when triggered by a cast operator.


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

--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Thu Apr 19 15:29:03 2018
New Revision: 259499

URL: https://gcc.gnu.org/viewcvs?rev=259499&root=gcc&view=rev
Log:
PR c++/85464 - missing location for -Wignored-qualifiers diagnostic

The fix for PR c++/69733 caused a regression for conversion operators
with redundant cv-qualifiers, changing an incorrect location to an
unknown location. This restores it to the incorrect location (as was
already done on trunk by the fix for PR c++/65775).

gcc/cp:

        PR c++/85464 - missing location for -Wignored-qualifiers diagnostic
        * decl.c (grokdeclarator): If declspecs->locations[ds_type_spec]
        is UNKNOWN_LOCATION fall back to input_location.

gcc/testsuite:

        PR c++/85464 - missing location for -Wignored-qualifiers diagnostic
        * g++.dg/diagnostic/pr85464.C: New.

Added:
    branches/gcc-7-branch/gcc/testsuite/g++.dg/diagnostic/pr85464.C
Modified:
    branches/gcc-7-branch/gcc/cp/ChangeLog
    branches/gcc-7-branch/gcc/cp/decl.c
    branches/gcc-7-branch/gcc/testsuite/ChangeLog

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