[Top][All Lists]

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

Re: [Tinycc-devel] Buiding binutils 2.17 (needs dynamic arrays).

From: Rob Landley
Subject: Re: [Tinycc-devel] Buiding binutils 2.17 (needs dynamic arrays).
Date: Tue, 2 Oct 2007 18:26:58 -0500
User-agent: KMail/1.9.6

On Tuesday 02 October 2007 12:19:18 pm Rob Landley wrote:
> Any opinions on how to tackle this one?

Confirmed that gcc makes sizeof() a runtime function in this case:

#include <stdio.h>

int main(int argc, char *argv[])
  int walrus[atoi(argv[1])];
  printf("%d\n", sizeof(walrus));
  return 0;

Running "./a.out 42" produced 168.

Oh yeah, that's gonna be fun...

"One of my most productive days was throwing away 1000 lines of code."
  - Ken Thompson.

reply via email to

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