[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gcc memory allocation
If you have learned Theory of Compilation, then there's some intermediate
code optimization called Constant Propagation. This means that if on the
second line, n is known at compilation time, then it's value is
substituted for n.
Shachar Tal
-------------
Faculty of Computer Science, Technion, Israel Institute of Technology
KeyID 0481FEF1 fingerprint = 52 1B 97 6A F2 77 AE C6 64 B6 5A 5E 14 28 8E 7E
On Tue, 2 Jun 1998, Constantin Eizner wrote:
> I was really sure that it doesn't work.
> I expected for message like " constant expected" or something like that.
>
> Nothing was happened.
> How the hell that work. What about memory allocation theory.
> Or I'm crazy.
>
> irina [10] /tmp > gcc test.c
> irina [11] /tmp >
>
> void main()
> {
> int n=9;
> int a[n];
> }
>
> --
> ------------------------------------------------------------------------------
> Computer Center of Haifa University
> Mount Carmel, Haifa 31905, Israel
> ------------------------------------------------------------------------------
> Constantin Eizner | Tel. 972-4-8249299
> Network Engineer | Fax. 972-8249177
> Unix System Administrator | E-mail eizner@research.haifa.ac.il
> ------------------------------------------------------------------------------
> Key fingerprint = 47 A3 99 BA 6D 7A A4 82 EF EF 07 CF 06 D5 DA 4C
>
>
>
>