bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

test-c-stack and C89 [was: snapshot in preparation for m4 1.4.12]


From: Eric Blake
Subject: test-c-stack and C89 [was: snapshot in preparation for m4 1.4.12]
Date: Mon, 11 Aug 2008 06:33:59 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080708 Thunderbird/2.0.0.16 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Alain Guibert on 8/8/2008 4:13 AM:

Hello, Alain,

I'll reply to different issues with different subject lines, to make it
easier to track.

| | gcc  -I. -I../lib  -I. -I. -I.. -I./.. -I../lib -I./../lib   -g -O2 -c
test-c-stack.c
| | test-c-stack.c: In function `main':
| | test-c-stack.c:59: parse error before `struct'
| | test-c-stack.c:60: `rl' undeclared (first use this function)
| | test-c-stack.c:60: (Each undeclared identifier is reported only once
| | test-c-stack.c:60: for each function it appears in.)
| | make[5]: *** [test-c-stack.o] Error 1
| | make[5]: Target `test-c-stack' not remade because of errors.
|
| Apparently due to a "struct rlimit rl;" in the middle of a function.
| After moving the line to the beginning, this builds without problem.

Thanks.  I'm committing this:

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkigMbYACgkQ84KuGfSFAYBHKgCdH20EwAW6V2u8LuCB6F7ELwbl
3PUAnRUkBvcjmIDvrrvRhJ4rYTlkhn+Q
=8ePt
-----END PGP SIGNATURE-----
diff --git a/ChangeLog b/ChangeLog
index 91f1106..fdb36e2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-08-11  Eric Blake  <address@hidden>
+
+       test-c-stack: avoid C99-ism
+       * tests/test-c-stack.c (main): Fix whitespace, move declaration
+       before statement.
+       Reported by Alain Guibert.
+
 2008-08-10  Jim Meyering  <address@hidden>
 
        ensure that return value of uinttostr et al are not ignored
diff --git a/tests/test-c-stack.c b/tests/test-c-stack.c
index bcf72ad..c1600a5 100644
--- a/tests/test-c-stack.c
+++ b/tests/test-c-stack.c
@@ -50,7 +50,6 @@ char *program_name;
 int
 main (int argc, char **argv)
 {
-   program_name = argv[0];
 #if HAVE_SETRLIMIT && defined RLIMIT_STACK
    /* Before starting the endless recursion, try to be friendly to the
       user's machine.  On some Linux 2.2.x systems, there is no stack
@@ -61,6 +60,7 @@ main (int argc, char **argv)
    setrlimit (RLIMIT_STACK, &rl);
 #endif
 
+  program_name = argv[0];
   if (c_stack_action (0) == 0)
     {
       if (1 < argc)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]