[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tinycc-devel] errno clearing with tcc -run
From: |
Sergey Korshunoff |
Subject: |
[Tinycc-devel] errno clearing with tcc -run |
Date: |
Wed, 25 Mar 2015 08:36:18 +0300 |
Hi!
There is a bug #43984: tcc -run reports errno=2
The following program (errno.c) reports errno=2 when run using "tcc
-run errno.c"
It reports errno=0 when run using "tcc errno.c && ./a.out".
#include <errno.h>
#include <stdio.h>
int main(void) { printf("errno=%d\n", errno); return 0; }
If all section of the compiled program are inited OK, then errno != 0
is a result of some system call of the tcc before a compiled program
is executed. Is there a need to clean the errno?
- [Tinycc-devel] errno clearing with tcc -run,
Sergey Korshunoff <=