mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-28 07:08:01 +08:00
Fix compile time warning message in linker testsuite test.
* testsuite/ld-ifunc/pr18808b.c (bar): Fix compile time warning about non-void function returning without a result.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2017-02-21 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
* testsuite/ld-ifunc/pr18808b.c (bar): Fix compile time warning
|
||||||
|
about non-void function returning without a result.
|
||||||
|
|
||||||
2017-02-17 Alan Modra <amodra@gmail.com>
|
2017-02-17 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
PR 15041
|
PR 15041
|
||||||
|
@ -1,24 +1,26 @@
|
|||||||
int foo (int x) __attribute__ ((ifunc ("resolve_foo")));
|
int foo (int) __attribute__ ((ifunc ("resolve_foo")));
|
||||||
extern void abort (void);
|
extern void abort (void);
|
||||||
|
|
||||||
static int foo_impl(int x)
|
static int
|
||||||
|
foo_impl (int x)
|
||||||
{
|
{
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
||||||
int bar()
|
void
|
||||||
|
bar (void)
|
||||||
{
|
{
|
||||||
int (*f)(int) = foo;
|
int (*f)(int) = foo;
|
||||||
|
|
||||||
if (foo (5) != 5)
|
if (foo (5) != 5)
|
||||||
abort ();
|
abort ();
|
||||||
|
|
||||||
if (f(42) != 42)
|
if (f (42) != 42)
|
||||||
abort ();
|
abort ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void *
|
||||||
void *resolve_foo (void)
|
resolve_foo (void)
|
||||||
{
|
{
|
||||||
return (void *) foo_impl;
|
return (void *) foo_impl;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user