From 35430c52c8b8b311985535b46bd7ba592bb5d805 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Sun, 3 Nov 2019 16:29:05 +0100 Subject: Dpkg::Vendor::Debian: Do not set -Werror=implicit-function-declaration for C++ Closes: #939969 --- debian/changelog | 2 ++ scripts/Dpkg/Vendor/Debian.pm | 17 +++++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index f9698ef17..abd1c27f1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -42,6 +42,8 @@ dpkg (1.20.0) UNRELEASED; urgency=medium single-debian-patch. Closes: #933152 - Dpkg::Vendor::Debian: Only scan /usr/local/ directories that exist. Closes: #932967 + - Dpkg::Vendor::Debian: Do not set -Werror=implicit-function-declaration + for C++. Closes: #939969 * Documentation: - man: Fix uncommon wording constructs. - man: Use a minus sign for a literal string. diff --git a/scripts/Dpkg/Vendor/Debian.pm b/scripts/Dpkg/Vendor/Debian.pm index 65c7f2bad..71aa59038 100644 --- a/scripts/Dpkg/Vendor/Debian.pm +++ b/scripts/Dpkg/Vendor/Debian.pm @@ -185,8 +185,21 @@ sub _add_build_flags { # Warnings that detect actual bugs. if ($use_feature{qa}{bug}) { - foreach my $warnflag (qw(array-bounds clobbered volatile-register-var - implicit-function-declaration)) { + # C flags + my @cflags = qw( + implicit-function-declaration + ); + foreach my $warnflag (@cflags) { + $flags->append('CFLAGS', "-Werror=$warnflag"); + } + + # C/C++ flags + my @cfamilyflags = qw( + array-bounds + clobbered + volatile-register-var + ); + foreach my $warnflag (@cfamilyflags) { $flags->append('CFLAGS', "-Werror=$warnflag"); $flags->append('CXXFLAGS', "-Werror=$warnflag"); } -- cgit v1.2.3