bug-gnulib
[Top][All Lists]
Advanced

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

'static' in array-size func parm


From: Thien-Thi Nguyen
Subject: 'static' in array-size func parm
Date: Wed, 06 Aug 2014 08:30:29 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

I recently learned that GCC 3.4.3 on Solaris 10 cannot compile:

 int
 last (int count, int all[static count])
 {
   return all[count - 1];
 }

(valid C99, AFAIU), and have changed GNU RCS to work around the
situation, in the form of a configure-time test[0], a simple cpp
macro[1], and then various uses[2] of the macro.

 [0] http://git.sv.gnu.org/cgit/rcs.git/commit/?id=c5909f7785
 [1] http://git.sv.gnu.org/cgit/rcs.git/commit/?id=3efe2d4c96
 [2] http://git.sv.gnu.org/cgit/rcs.git/commit/?id=ab84450872
     http://git.sv.gnu.org/cgit/rcs.git/commit/?id=3e1ae8c823

Would this stuff (appropriately massaged) be interesting to gnulib?

-- 
Thien-Thi Nguyen
   GPG key: 4C807502
   (if you're human and you know it)
      read my lisp: (responsep (questions 'technical)
                               (not (via 'mailing-list)))
                     => nil

Attachment: signature.asc
Description: PGP signature


reply via email to

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