aboutsummaryrefslogtreecommitdiff
path: root/gcc/libgcc1-test.c
diff options
context:
space:
mode:
authorMichael Meissner <meissner@cygnus.com>1999-10-05 23:07:09 +0000
committerMichael Meissner <meissner@gcc.gnu.org>1999-10-05 23:07:09 +0000
commit820f6e3ac90c9d7e2370d0bc5f0c7ae549c49662 (patch)
tree71c9266b821c1ac91ca564a8cd9a87f0d9c25948 /gcc/libgcc1-test.c
parent2f9e65b1f1677a6268a587b3d389488c20ffefb1 (diff)
downloadgcc-820f6e3ac90c9d7e2370d0bc5f0c7ae549c49662.zip
gcc-820f6e3ac90c9d7e2370d0bc5f0c7ae549c49662.tar.gz
gcc-820f6e3ac90c9d7e2370d0bc5f0c7ae549c49662.tar.bz2
Make libgcc1-test.c compile without warnings
From-SVN: r29832
Diffstat (limited to 'gcc/libgcc1-test.c')
-rw-r--r--gcc/libgcc1-test.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/gcc/libgcc1-test.c b/gcc/libgcc1-test.c
index d9c250e..67c7639 100644
--- a/gcc/libgcc1-test.c
+++ b/gcc/libgcc1-test.c
@@ -3,12 +3,17 @@
you have provided replacements for all the libgcc1.c functions that
your target machine needs. */
+#include <stddef.h>
+
int foo ();
double dfoo ();
+void discard (int);
+void ddiscard (double);
/* We don't want __main here because that can drag in atexit (among other
things) which won't necessarily exist yet. */
+int
main_without__main ()
{
int a = foo (), b = foo ();
@@ -65,14 +70,17 @@ main_without__main ()
return 0;
}
+void
discard (x)
- int x;
+ int x __attribute__((__unused__));
{}
+void
ddiscard (x)
- double x;
+ double x __attribute__((__unused__));
{}
+int
foo ()
{
static int table[] = {20, 69, 4, 12};
@@ -98,7 +106,12 @@ extern void _start() __asm__("_start");
extern void __start() __asm__("__start");
/* Provide functions that might be needed by soft-float emulation routines. */
-void memcpy() {}
+void *memcpy(void *to,
+ const void *from __attribute__((__unused__)),
+ size_t len __attribute__((__unused__)))
+{
+ return to;
+}
void start() {}
void _start() {}