Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Foley <pefoley2@pefoley.com>2016-03-19 20:45:47 +0300
committerCorinna Vinschen <corinna@vinschen.de>2016-03-20 13:51:43 +0300
commitc0b6fc54b1b0025dc02b5e1731ebd4f4aec1bfd0 (patch)
treeed1880a76b2647bc43231ba1c36bc94bfe7d9e8a
parent3df400dc83d51cf376c980fc9a8806848fe6170c (diff)
Remove unused and unsafe call to __builtin_frame_address
initial_sp has been unused since commit fbf23e3 back in 2000. Keep the value, so as to avoid changing the offset of magic_biscuit. winsup/cygwin/lib/_cygwin_crt0_common.cc:140:52: error: calling 'void* __builtin_frame_address(unsigned int)' with a nonzero argument is unsafe [-Werror=frame-address] u->initial_sp = (char *) __builtin_frame_address (1); winsup/cygwin/ChangeLog lib/_cygwin_crt0_common.cc (_cygwin_crt0_common): Initialize initial_sp with nullptr. Signed-off-by: Peter Foley <pefoley2@pefoley.com>
-rw-r--r--winsup/cygwin/lib/_cygwin_crt0_common.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/winsup/cygwin/lib/_cygwin_crt0_common.cc b/winsup/cygwin/lib/_cygwin_crt0_common.cc
index 718ce941e..50785d7a0 100644
--- a/winsup/cygwin/lib/_cygwin_crt0_common.cc
+++ b/winsup/cygwin/lib/_cygwin_crt0_common.cc
@@ -135,9 +135,8 @@ _cygwin_crt0_common (MainFunc f, per_process *u)
u->premain[3] = cygwin_premain3;
u->fmode_ptr = &_fmode;
- /* This is used to record what the initial sp was. The value is needed
- when copying the parent's stack to the child during a fork. */
- u->initial_sp = (char *) __builtin_frame_address (1);
+ /* Unused */
+ u->initial_sp = NULL;
/* Remember whatever the user linked his application with - or
point to entries in the dll. */