This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] RISC-V: Fix elfutils testsuite unwind failures.
- From: DJ Delorie <dj at redhat dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: jimw at sifive dot com, libc-alpha at sourceware dot org
- Date: Mon, 04 Feb 2019 18:57:25 -0500
- Subject: Re: [PATCH] RISC-V: Fix elfutils testsuite unwind failures.
Joseph Myers <joseph@codesourcery.com> writes:
>> Hmm... that's new in gcc 5, so color me surprised. As that is glibc's
>> minimum build version, I retract my comment.
>
> It's a C99 feature that I implemented for GCC 3.0.
Perhaps having it as the default is new in gcc 5 then. GCC 4 compiles
without that feature by default:
gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC)
#include <stdio.h>
#include <stdlib.h>
char * const str;
int
main()
{
free (str);
}
$ gcc -S test.c
main:
pushq %rbp
movq %rsp, %rbp
movq str(%rip), %rax
movq %rax, %rdi
call free
popq %rbp
ret