diff options
author | Guillem Jover <guillem@debian.org> | 2019-11-03 16:29:05 +0100 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2019-11-26 02:42:44 +0100 |
commit | 35430c52c8b8b311985535b46bd7ba592bb5d805 (patch) | |
tree | 3c86eec4fec46136a5ee5f9354e2056aad196f75 | |
parent | 79d01b9283bb8c5c9867a9601a4b3011f207684f (diff) | |
download | dpkg-35430c52c8b8b311985535b46bd7ba592bb5d805.tar.gz |
Dpkg::Vendor::Debian: Do not set -Werror=implicit-function-declaration for C++
Closes: #939969
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | 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"); } |