standard conformant inline functions
commit587e1f5598f2b0c35c7772bde486d47aa9a0cbbc
authorPetr Skocik <pskocik@gmail.com>
Tue, 11 Jun 2019 13:28:42 +0000 (11 15:28 +0200)
committerPetr Skocik <pskocik@gmail.com>
Tue, 11 Jun 2019 14:29:24 +0000 (11 16:29 +0200)
tree55d7e2af0515ff6b3e4b077eb6b70148c979972b
parentf2fd56a27dc0abf9f34c9a950456853ad13c4f96
standard conformant inline functions

- add tests for standard conformant inline functions
- implement it

The  old tinycc failed to provide a conforming implementation
of non-static inlines.  It would expose external symbols where it
shouldn't and hide them where it should expose them.

This commit provides a hopefully comprehensive test suite
for how things should be done. The .expect file can be obtained
by compiling the example c file (embedded in the test)
with a conforming compiler such as gcc, clang or icc and then
printing the exported symbols (e.g., with nm+awk+sort).

(The implementation currently reserves two new VT_ flags.
If anyone can provide an implementation without reserving
two extra flags, please replace mine.)
tcc.h
tccgen.c
tests/tests2/104_inline_test.c [new file with mode: 0644]
tests/tests2/104_inline_test.expect [new file with mode: 0644]