This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Inline documentation patch...


In article <19990209150901.A3979@cygnus.com>,
rth@cygnus.com (Richard Henderson) writes:
> On Wed, Feb 10, 1999 at 12:10:07PM +1300, Bill Currie wrote:
>> Is this pascal style nested functions?  As in
>> 
>> foo()
>> {
>> bar()
>> {
>> }
>> }

> Yes.

>> Eh? *HOW* do you do that?
>> 
>> >   * variable sized arguments
>> 
>> Ditto.

> You can't in C.  I'm not sure how you would get this.  Perhaps
> pascal-style erum conditional union thingies fall in this 
> category.  Nevertheless the check is there.

Can't you in GNU C? This is the example from the info pages:

     struct entry
     tester (int len, char data[len][len])
     {
       ...
     }

Or more advanced:

     struct entry
     tester (int len; char data[len][len], int len)
     {
       ...
     }

This is _very_ useful for code that operates on variable length
arrays with multiple dimensions - one area where C was poor compared
to Fortran.
 
The upcomming ISO C9x draft has a similar, but subtly incompatible (:()
feature. 

-Andi

-- 
This is like TV. I don't like TV.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]