FreeBSD Port: tcc-0.9.26_3

Ben Wiederhake ben.wiederhake at
Thu Apr 14 00:21:48 UTC 2016


"#include <stdint.h>" seems to be impossible with tcc on FreeBSD.

Steps to reproduce:
Try to compile the following program:
#include <stdint.h>
#include <stdio.h>
int main(void){printf("Hello world\n");}

Excepted results:
Compilation finishes with no errors.

Actual results:
In file included from foo.c:1:
In file included from /usr/include/stdint.h:33:
In file included from /usr/include/sys/_types.h:33:
In file included from /usr/include/machine/_types.h:6:
/usr/include/x86/_types.h:161: error: too many basic types
And compilation fails.
In a real life project, it fails at exactly the same spot [2]

Diagnostics from the meatbag (hello!):
- Using gcc and clang instead works fine.  This must be tcc's fault, not 
- On Ubuntu and Debian, tcc 0.9.26 works fine, too.  This must be some 
fault in the compilation, environment, or libraries of tcc, not tcc's 
code itself.
- The error message stems from line 2510 in tccgen.c [1]. However, I 
don't understand how it got there and where it "counts".
- This might also be due to a forgotten semicolon [3], which I deem 
inlikely for a system header.
- Note that tcc is one-pass, so it doesn't even know anything except the 
first line of foo.c.  Thus, tcc is currently unusable for me.

Versions, as far as I can tell:
- 'tcc -dumpversion' says '0.9.26'.
- `pkg upgrade` says 'Your packages are up to date.'
- `uname -a` says 'FreeBSD  10.3-RELEASE FreeBSD 10.3-RELEASE #0 
r297264: Fri Mar 25 02:10:02 UTC 2016'

Ben Wiederhake


More information about the freebsd-ports mailing list