[llvm-bugs] [Bug 39599] New: -Wdeprecated is not implied by -Wall -Wextra

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Nov 9 02:12:48 PST 2018


https://bugs.llvm.org/show_bug.cgi?id=39599

            Bug ID: 39599
           Summary: -Wdeprecated is not implied by -Wall -Wextra
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: romain.geissler at amadeus.com
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

Hi,

People usually use -Wall -Wextra to try to build their code base with strict
standards, while keeping only the warnings that are relevant (ie unlike
-Weverything which is only useful for clang developers). With gcc 9, the new
deprecation warning  -Wdeprecated-copy (which clang's -Wdeprecated enables) is
enabled -by -Wall (source https://www.gnu.org/software/gcc/gcc-9/changes.html).
I expect that other gcc's warning about deprecation are enabled by either -Wall
or -Wextra.

Do you think it would make sense to enable -Wdeprecated and all -Wdeprecated-*
flags with -Wall/-Wextra ?

Example of code that builds fine with -Wall -Wextra -Werror, but not if you add
-Wdeprecated:

class A
{
    public:
        ~A();
};

void g(const A&);

void f(const A& a)
{
    A b = a;
    g(b);
}

Cheers,
Romain

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20181109/9783f627/attachment.html>


More information about the llvm-bugs mailing list