From: Christian Franke <Christian.Franke@t-online.de>
To: cygwin-apps@cygwin.com
Subject: [PATCH cygport] Add -Werror=return-type to CXXFLAGS/OBJCXXFLAGS
Date: Thu, 2 Sep 2021 19:01:44 +0200 [thread overview]
Message-ID: <46c7477b-fbab-f1f7-c404-815db54a90e0@t-online.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 227 bytes --]
Ignoring -Wreturn-type for C++ programs may lead to crashes. C language
is not affected.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96181
https://sourceware.org/pipermail/cygwin/2021-August/249153.html
Regards,
Christian
[-- Attachment #2: 0001-Add-Werror-return-type-to-CXXFLAGS-OBJCXXFLAGS.patch --]
[-- Type: text/plain, Size: 958 bytes --]
From 2bd92abdf273e2bc3a899afffe0245b232150992 Mon Sep 17 00:00:00 2001
From: Christian Franke <christian.franke@t-online.de>
Date: Thu, 2 Sep 2021 18:52:39 +0200
Subject: [PATCH] Add -Werror=return-type to CXXFLAGS/OBJCXXFLAGS.
G++ >= 8.0 assumes that control never reaches the end of a
non-void function (GCC Bugzilla 96181).
---
lib/compilers.cygpart | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/compilers.cygpart b/lib/compilers.cygpart
index b775489..129e115 100644
--- a/lib/compilers.cygpart
+++ b/lib/compilers.cygpart
@@ -56,9 +56,9 @@ declare -x CXX="g++";
# Flags passed to CXX when compiling C++ code. Individual packages may append
# or override this value if they will not build correctly without it.
# DEFAULT VALUE
-# CFLAGS
+# CFLAGS -Werror=return-type
#****
-declare -x CXXFLAGS=${CFLAGS};
+declare -x CXXFLAGS="${CFLAGS} -Werror=return-type";
#****d* Compiling/F77
# DESCRIPTION
--
2.33.0
reply other threads:[~2021-09-02 17:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46c7477b-fbab-f1f7-c404-815db54a90e0@t-online.de \
--to=christian.franke@t-online.de \
--cc=cygwin-apps@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).