From 2391e11d3a331a700cd44fe6af314a5f5adfeea0 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Thu, 13 Jul 2000 05:07:54 +0000 Subject: Check that GDB and the C compiler agree about the sizeof a few basic C types. --- gdb/testsuite/gdb.base/sizeof.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 gdb/testsuite/gdb.base/sizeof.c (limited to 'gdb/testsuite/gdb.base/sizeof.c') diff --git a/gdb/testsuite/gdb.base/sizeof.c b/gdb/testsuite/gdb.base/sizeof.c new file mode 100644 index 00000000000..bdc3d02e5ba --- /dev/null +++ b/gdb/testsuite/gdb.base/sizeof.c @@ -0,0 +1,17 @@ +int +main () +{ + printf ("sizeof (char) == %d\n", sizeof (char)); + printf ("sizeof (short) == %d\n", sizeof (short)); + printf ("sizeof (int) == %d\n", sizeof (int)); + printf ("sizeof (long) == %d\n", sizeof (long)); + printf ("sizeof (long long) == %d\n", sizeof (long long)); + + printf ("sizeof (void *) == %d\n", sizeof (void*)); + printf ("sizeof (void (*)(void)) == %d\n", sizeof (void (*)(void))); + + printf ("sizeof (float) == %d\n", sizeof (float)); + printf ("sizeof (double) == %d\n", sizeof (double)); + printf ("sizeof (long double) == %d\n", sizeof (long double)); + return 0; +} -- cgit v1.2.1