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: unassignedclangb...@nondot.org
          Reporter: romain.geiss...@amadeus.com
                CC: blitzrak...@gmail.com, dgre...@apple.com,
                    erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
                    richard-l...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to