[Top][All Lists]

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

Re: [avr-gcc-list] Improving in leaps and skips!

From: Rolf Ebert
Subject: Re: [avr-gcc-list] Improving in leaps and skips!
Date: Wed, 02 Mar 2005 22:09:51 +0100
User-agent: Opera M2/7.54 (Win32, build 3865)

On Wed, 02 Mar 2005 12:56:56 -0700, E. Weddington <address@hidden> wrote:

Rolf Ebert wrote:

The mere availablity of nested functions in GNU C made it possible to base GNU compilers for Ada and Pascal on the existing GNU C compiler.

If that's the case, does the fact that nested functions don't seem to work for the AVR (according to Björn's view of working with the test suite) affect how AVR-Ada will behave? Will there be problems?

That depends on the meaning of the word "work"...

I never had problems up to now with nested functions in AVR-Ada. But then I have mostly small local functions that don't do heavy tasks and that have short parameter lists.

Before posting this answer I made up a test case with heavily nested functions of three levels with local variables at all levels partly hiding each other. The test case works correctly when I simulate it in AVR Studio!

The example which started this thread passes a pointer to a nested function as a parameter to another function. I did not test that case (will do shortly). That seems to be a very contrived example. I had never seen code like this.

The point is: nested functions *do work* in AVR-Ada for what they are typically used in Ada (limiting visibilty, enhancing code readability).


reply via email to

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