Skip to content

Commit

Permalink
* mark_rts.c (GC_approx_sp): Use __builtin_frame_address when
Browse files Browse the repository at this point in the history
	compiling with GCC rather than taking the address of a local
	variable.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154771 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information
bje committed Nov 30, 2009
1 parent 37c2352 commit 6665ce3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions boehm-gc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2009-11-30 Ben Elliston <bje@au.ibm.com>

* mark_rts.c (GC_approx_sp): Use __builtin_frame_address when
compiling with GCC rather than taking the address of a local
variable.

2009-11-30 Ben Elliston <bje@au.ibm.com>

* os_dep.c: Use the POSIX signal API in preference to the BSD API.
Expand Down
8 changes: 7 additions & 1 deletion boehm-gc/mark_rts.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,13 @@ ptr_t GC_approx_sp()
# ifdef _MSC_VER
# pragma warning(disable:4172)
# endif
return((ptr_t)(&dummy));
#ifdef __GNUC__
/* Eliminate a warning from GCC about taking the address of a
local variable. */
return __builtin_frame_address (0);
#else
return ((ptr_t)(&dummy));
#endif /* __GNUC__ */
# ifdef _MSC_VER
# pragma warning(default:4172)
# endif
Expand Down

0 comments on commit 6665ce3

Please sign in to comment.