Re: [OT] Non-GCC compilers used for linux userspace

Rob Landley
2006-03-30T23:18:34Z

On Thursday 30 March 2006 5:02 pm, Nix wrote:
> > Keep in mind that the main use of tcc these days is to turn c into a
> > scripting language. Just start your C file with
> >
> > #!/usr/bin/tcc -run
>
> I feel distinctly queasy. (I can't easily think of a less suitable language
> for scripting than C, either: perhaps COBOL...)

No, the queasy bit is when you realize that you can stick library linkage
directives on that command line and thus you can dynamically compile and run
X apps.

They have examples of doing this. :)

> > And notice that #! is a preprocessor comment line as far as tcc is
> > concerned. :)
>
> I noticed that, but I didn't think anyone actually *used* tcc for this.

It's not exactly "what it's for", but it's up there.

Rob
--
Never bet against the cheap plastic solution.