Commit f1fdb5bc authored by Paul Eggert's avatar Paul Eggert

Align stack bottom properly.

This is needed for gcc -Os -flto on x86-64 (Bug#28213).
* src/emacs.c (main): Align stack-bottom variable as a pointer,
since mark_memory requires this.
parent 02255c5f
......@@ -672,7 +672,10 @@ close_output_streams (void)
int
main (int argc, char **argv)
{
char stack_bottom_variable;
/* Variable near the bottom of the stack, and aligned appropriately
for pointers. */
void *stack_bottom_variable;
bool do_initial_setlocale;
bool dumping;
int skip_args = 0;
......@@ -688,7 +691,7 @@ main (int argc, char **argv)
char *original_pwd = 0;
/* Record (approximately) where the stack begins. */
stack_bottom = &stack_bottom_variable;
stack_bottom = (char *) &stack_bottom_variable;
#ifndef CANNOT_DUMP
dumping = !initialized && (strcmp (argv[argc - 1], "dump") == 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment