This is the mail archive of the cygwin-cvs@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[newlib-cygwin] cygwin: disable -Wframe-address warning only on GCC 6 or later


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=7346a162f2956c53f36a0cabf969e7b8186d81b0

commit 7346a162f2956c53f36a0cabf969e7b8186d81b0
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Mon Oct 9 18:08:10 2017 +0200

    cygwin: disable -Wframe-address warning only on GCC 6 or later
    
    This is required as long as we don't have a GCC 6.x cross compiler
    on Linux.
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/cygwin/crt0.c  | 4 ++++
 winsup/cygwin/init.cc | 6 +++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/winsup/cygwin/crt0.c b/winsup/cygwin/crt0.c
index 271f5b9..fee4b2e 100644
--- a/winsup/cygwin/crt0.c
+++ b/winsup/cygwin/crt0.c
@@ -20,9 +20,13 @@ void
 mainCRTStartup ()
 {
 #ifdef __i386__
+#if __GNUC_PREREQ(6,0)
 #pragma GCC diagnostic ignored "-Wframe-address"
+#endif
   (void)__builtin_return_address(1);
+#if __GNUC_PREREQ(6,0)
 #pragma GCC diagnostic pop
+#endif
   asm volatile ("andl $-16,%%esp" ::: "%esp");
 #endif
 
diff --git a/winsup/cygwin/init.cc b/winsup/cygwin/init.cc
index 2d4299e..aeeeac7 100644
--- a/winsup/cygwin/init.cc
+++ b/winsup/cygwin/init.cc
@@ -22,10 +22,14 @@ static bool dll_finished_loading;
 static void WINAPI
 threadfunc_fe (VOID *arg)
 {
-#ifndef __x86_64__
+#ifdef __i386__
+#if __GNUC_PREREQ(6,0)
 #pragma GCC diagnostic ignored "-Wframe-address"
+#endif
   (void)__builtin_return_address(1);
+#if __GNUC_PREREQ(6,0)
 #pragma GCC diagnostic pop
+#endif
   asm volatile ("andl $-16,%%esp" ::: "%esp");
 #endif
   _cygtls::call ((DWORD (*)  (void *, void *)) TlsGetValue (_my_oldfunc), arg);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]