>A preliminary patch for the -xc and -xa options is attached.

Fails. Output for a simple file (source included after output):
tcc -xc -run sgm/foo.cgi
-----------------------------8<-------------------------------------------------------
tcc: warning: file extension is C
sgm/foo.cgi:1: warning: We going to compile a C file

/usr/lib/i386-linux-gnu/libc.so:1: warning: We going to compile a C file

/usr/lib/i386-linux-gnu/libc.so:4: error: ',' expected (got "-")
/usr/lib/i386-linux-gnu/libc.a:1: warning: We going to compile a C file

/usr/lib/i386-linux-gnu/libc.a:1: error: declaration expected
/usr/local/lib/tcc/i386/libtcc1.a:1: warning: We going to compile a C file

/usr/local/lib/tcc/i386/libtcc1.a:1: error: declaration expected
---------------------------------------->8---------------------------------------------

Simple file (sgm/foo.cgi):
---------------------------------------->8-----------------------------------------------
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

int main(int argc, char **argv) {
  char *foo;
  foo = malloc(128);
  strcpy(foo,"Hello,CGI\n");
  printf(foo);
  free(foo);
  exit(0);
}
--------------------------------------8<----------------------------------------------------

Of course, if the extension is changed to '.c' it works as expected.

Thanks,
  Steven G.


_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to