History

add version number to manpage avoid c++/c99 style comments in preprocessor directives avoid leadings whitespaces in preprocessor directives mention implemented variable length arrays in documentation fixed ambiguous option in texi2html call (Austin English)

Urs Janssen committed 13 years ago

Commit 0bdbd491 parent d5e221022 files · +57 −56Browse files

Unified · Split

22 files
  1. Makefile +2 −2
  2. arm-gen.c +2 −2
  3. c67-gen.c +4 −4
  4. coff.h +3 −3
  5. elf.h +2 −2
  6. i386-asm.c +1 −1
  7. i386-gen.c +1 −1
  8. il-gen.c +2 −2
  9. lib/bcheck.c +2 −2
  10. libtcc.c +1 −1
  11. tcc-doc.texi +3 −2
  12. tcc.h +14 −14
  13. tccelf.c +1 −1
  14. tccpe.c +1 −1
  15. win32/include/inttypes.h +1 −1
  16. win32/include/stdio.h +10 −10
  17. win32/include/sys/stat.h +1 −1
  18. win32/include/sys/timeb.h +1 −1
  19. win32/include/sys/types.h +1 −1
  20. win32/include/sys/utime.h +1 −1
  21. win32/include/winapi/windef.h +1 −1
  22. win32/include/winapi/winerror.h +2 −2
Makefile+2−2
@@ -300,11 +300,11 @@ endif · 299 unmodified lines
300 300
301# documentation and man page301# documentation and man page
302tcc-doc.html: tcc-doc.texi302tcc-doc.html: tcc-doc.texi
303 -texi2html -monolithic -number $<303 -texi2html -monolithic -number-sections $<
304 304
305tcc.1: tcc-doc.texi305tcc.1: tcc-doc.texi
306 -$(top_srcdir)/texi2pod.pl $< tcc.pod306 -$(top_srcdir)/texi2pod.pl $< tcc.pod
307 -pod2man --section=1 --center=" " --release=" " tcc.pod > $@307 -pod2man --section=1 --center="Tiny C Compiler" --release=`cat $(top_srcdir)/VERSION` tcc.pod > $@
308 308
309tcc-doc.info: tcc-doc.texi309tcc-doc.info: tcc-doc.texi
310 -makeinfo $<310 -makeinfo $<
arm-gen.c+2−2
@@ -24,7 +24,7 @@ · 23 unmodified lines
24#ifdef TARGET_DEFS_ONLY24#ifdef TARGET_DEFS_ONLY
25 25
26#ifdef TCC_ARM_EABI26#ifdef TCC_ARM_EABI
27#ifndef TCC_ARM_VFP // Avoid useless warning27#ifndef TCC_ARM_VFP /* Avoid useless warning */
28#define TCC_ARM_VFP28#define TCC_ARM_VFP
29#endif29#endif
30#endif30#endif
@@ -104,7 +104,7 @@ enum { · 73 unmodified lines
104 104
105/* defined if structures are passed as pointers. Otherwise structures105/* defined if structures are passed as pointers. Otherwise structures
106 are directly pushed on stack. */106 are directly pushed on stack. */
107//#define FUNC_STRUCT_PARAM_AS_PTR107/* #define FUNC_STRUCT_PARAM_AS_PTR */
108 108
109/* pointer size, in bytes */109/* pointer size, in bytes */
110#define PTR_SIZE 4110#define PTR_SIZE 4
c67-gen.c+4−4
@@ -20,7 +20,7 @@ · 19 unmodified lines
20 20
21#ifdef TARGET_DEFS_ONLY21#ifdef TARGET_DEFS_ONLY
22 22
23//#define ASSEMBLY_LISTING_C6723/* #define ASSEMBLY_LISTING_C67 */
24 24
25/* number of available registers */25/* number of available registers */
26#define NB_REGS 2426#define NB_REGS 24
@@ -93,11 +93,11 @@ enum { · 66 unmodified lines
93#define REG_FRET TREG_C67_A4 /* float return register */93#define REG_FRET TREG_C67_A4 /* float return register */
94 94
95/* defined if function parameters must be evaluated in reverse order */95/* defined if function parameters must be evaluated in reverse order */
96//#define INVERT_FUNC_PARAMS96/* #define INVERT_FUNC_PARAMS */
97 97
98/* defined if structures are passed as pointers. Otherwise structures98/* defined if structures are passed as pointers. Otherwise structures
99 are directly pushed on stack. */99 are directly pushed on stack. */
100//#define FUNC_STRUCT_PARAM_AS_PTR100/* #define FUNC_STRUCT_PARAM_AS_PTR */
101 101
102/* pointer size, in bytes */102/* pointer size, in bytes */
103#define PTR_SIZE 4103#define PTR_SIZE 4
@@ -253,7 +253,7 @@ void gsym(int t) · 149 unmodified lines
253#define C67_B3 107253#define C67_B3 107
254#define C67_FP 108254#define C67_FP 108
255#define C67_B2 109255#define C67_B2 109
256#define C67_CREG_ZERO -1 // Special code for no condition reg test256#define C67_CREG_ZERO -1 /* Special code for no condition reg test */
257 257
258 258
259int ConvertRegToRegClass(int r)259int ConvertRegToRegClass(int r)
coff.h+3−3
@@ -37,8 +37,8 @@ struct filehdr { · 36 unmodified lines
37#define F_BYTE_ORDER (F_LITTLE | F_BIG)37#define F_BYTE_ORDER (F_LITTLE | F_BIG)
38#define FILHDR struct filehdr38#define FILHDR struct filehdr
39 39
40//#define FILHSZ sizeof(FILHDR) 40/* #define FILHSZ sizeof(FILHDR) */
41#define FILHSZ 22 // above rounds to align on 4 bytes which causes problems 41#define FILHSZ 22 /* above rounds to align on 4 bytes which causes problems */
42 42
43#define COFF_C67_MAGIC 0x00c243#define COFF_C67_MAGIC 0x00c2
44 44
@@ -150,7 +150,7 @@ struct scnhdr { · 105 unmodified lines
150/*------------------------------------------------------------------------*/150/*------------------------------------------------------------------------*/
151/* Define constants for names of "special" sections */151/* Define constants for names of "special" sections */
152/*------------------------------------------------------------------------*/152/*------------------------------------------------------------------------*/
153//#define _TEXT ".text"153/* #define _TEXT ".text" */
154#define _DATA ".data"154#define _DATA ".data"
155#define _BSS ".bss"155#define _BSS ".bss"
156#define _CINIT ".cinit"156#define _CINIT ".cinit"
elf.h+2−2
@@ -1725,7 +1725,7 @@ typedef Elf32_Addr Elf32_Conflict; · 1724 unmodified lines
1725#define R_C60_GOTOFF 9 /* 32 bit offset to GOT */1725#define R_C60_GOTOFF 9 /* 32 bit offset to GOT */
1726#define R_C60_GOTPC 10 /* 32 bit PC relative offset to GOT */1726#define R_C60_GOTPC 10 /* 32 bit PC relative offset to GOT */
1727 1727
1728#define R_C60HI16 0x55 // high 16 bit MVKH embedded1728#define R_C60HI16 0x55 /* high 16 bit MVKH embedded */
1729#define R_C60LO16 0x54 // low 16 bit MVKL embedded1729#define R_C60LO16 0x54 /* low 16 bit MVKL embedded */
1730 1730
1731#endif /* elf.h */1731#endif /* elf.h */
i386-asm.c+1−1
@@ -21,7 +21,7 @@ · 20 unmodified lines
21 21
22#include "tcc.h"22#include "tcc.h"
23 23
24// #define NB_ASM_REGS 824/* #define NB_ASM_REGS 8 */
25#define MAX_OPERANDS 325#define MAX_OPERANDS 3
26#define NB_SAVED_REGS 326#define NB_SAVED_REGS 3
27 27
i386-gen.c+1−1
@@ -55,7 +55,7 @@ enum { · 54 unmodified lines
55 55
56/* defined if structures are passed as pointers. Otherwise structures56/* defined if structures are passed as pointers. Otherwise structures
57 are directly pushed on stack. */57 are directly pushed on stack. */
58//#define FUNC_STRUCT_PARAM_AS_PTR58/* #define FUNC_STRUCT_PARAM_AS_PTR */
59 59
60/* pointer size, in bytes */60/* pointer size, in bytes */
61#define PTR_SIZE 461#define PTR_SIZE 4
il-gen.c+2−2
@@ -53,11 +53,11 @@ const int reg_classes[NB_REGS] = { · 52 unmodified lines
53#define REG_FRET REG_ST0 /* float return register */53#define REG_FRET REG_ST0 /* float return register */
54 54
55/* defined if function parameters must be evaluated in reverse order */55/* defined if function parameters must be evaluated in reverse order */
56//#define INVERT_FUNC_PARAMS56/* #define INVERT_FUNC_PARAMS */
57 57
58/* defined if structures are passed as pointers. Otherwise structures58/* defined if structures are passed as pointers. Otherwise structures
59 are directly pushed on stack. */59 are directly pushed on stack. */
60//#define FUNC_STRUCT_PARAM_AS_PTR60/* #define FUNC_STRUCT_PARAM_AS_PTR */
61 61
62/* pointer size, in bytes */62/* pointer size, in bytes */
63#define PTR_SIZE 463#define PTR_SIZE 4
lib/bcheck.c+2−2
@@ -29,11 +29,11 @@ · 28 unmodified lines
29#include <unistd.h>29#include <unistd.h>
30#endif30#endif
31 31
32//#define BOUND_DEBUG32/* #define BOUND_DEBUG */
33 33
34/* define so that bound array is static (faster, but use memory if34/* define so that bound array is static (faster, but use memory if
35 bound checking not used) */35 bound checking not used) */
36//#define BOUND_STATIC36/* #define BOUND_STATIC */
37 37
38/* use malloc hooks. Currently the code cannot be reliable if no hooks */38/* use malloc hooks. Currently the code cannot be reliable if no hooks */
39#define CONFIG_TCC_MALLOC_HOOKS39#define CONFIG_TCC_MALLOC_HOOKS
libtcc.c+1−1
@@ -1018,7 +1018,7 @@ LIBTCCAPI TCCState *tcc_new(void) · 1017 unmodified lines
1018 s->char_is_unsigned = 1;1018 s->char_is_unsigned = 1;
1019#endif1019#endif
1020 /* enable this if you want symbols with leading underscore on windows: */1020 /* enable this if you want symbols with leading underscore on windows: */
1021#if 0 //def TCC_TARGET_PE1021#if 0 /* def TCC_TARGET_PE */
1022 s->leading_underscore = 1;1022 s->leading_underscore = 1;
1023#endif1023#endif
1024#ifdef TCC_TARGET_I3861024#ifdef TCC_TARGET_I386
tcc-doc.texi+3−2
@@ -388,13 +388,14 @@ and floating point numbers (@code{long double}, @code{double}, and · 387 unmodified lines
388@section ISOC99 extensions388@section ISOC99 extensions
389 389
390TCC implements many features of the new C standard: ISO C99. Currently390TCC implements many features of the new C standard: ISO C99. Currently
391missing items are: complex and imaginary numbers and variable length391missing items are: complex and imaginary numbers.
392arrays.
393 392
394Currently implemented ISOC99 features:393Currently implemented ISOC99 features:
395 394
396@itemize395@itemize
397 396
397@item variable length arrays.
398
398@item 64 bit @code{long long} types are fully supported.399@item 64 bit @code{long long} types are fully supported.
399 400
400@item The boolean type @code{_Bool} is supported.401@item The boolean type @code{_Bool} is supported.
tcc.h+14−14
@@ -98,21 +98,21 @@ · 97 unmodified lines
98#include "libtcc.h"98#include "libtcc.h"
99 99
100/* parser debug */100/* parser debug */
101//#define PARSE_DEBUG101/* #define PARSE_DEBUG */
102/* preprocessor debug */102/* preprocessor debug */
103//#define PP_DEBUG103/* #define PP_DEBUG */
104/* include file debug */104/* include file debug */
105//#define INC_DEBUG105/* #define INC_DEBUG */
106/* memory leak debug */106/* memory leak debug */
107//#define MEM_DEBUG107/* #define MEM_DEBUG */
108/* assembler debug */108/* assembler debug */
109//#define ASM_DEBUG109/* #define ASM_DEBUG */
110 110
111/* target selection */111/* target selection */
112//#define TCC_TARGET_I386 /* i386 code generator */112/* #define TCC_TARGET_I386 *//* i386 code generator */
113//#define TCC_TARGET_ARM /* ARMv4 code generator */113/* #define TCC_TARGET_ARM *//* ARMv4 code generator */
114//#define TCC_TARGET_C67 /* TMS320C67xx code generator */114/* #define TCC_TARGET_C67 *//* TMS320C67xx code generator */
115//#define TCC_TARGET_X86_64 /* x86-64 code generator */115/* #define TCC_TARGET_X86_64 *//* x86-64 code generator */
116 116
117/* default target is I386 */117/* default target is I386 */
118#if !defined(TCC_TARGET_I386) && !defined(TCC_TARGET_ARM) && \118#if !defined(TCC_TARGET_I386) && !defined(TCC_TARGET_ARM) && \
@@ -894,7 +894,7 @@ struct TCCState { · 775 unmodified lines
894 DEF_ASM(x ## nle) \894 DEF_ASM(x ## nle) \
895 DEF_ASM(x ## g)895 DEF_ASM(x ## g)
896 896
897#endif // defined TCC_TARGET_I386 || defined TCC_TARGET_X86_64897#endif /* defined TCC_TARGET_I386 || defined TCC_TARGET_X86_64 */
898 898
899enum tcc_token {899enum tcc_token {
900 TOK_LAST = TOK_IDENT - 1,900 TOK_LAST = TOK_IDENT - 1,
@@ -909,10 +909,10 @@ enum tcc_token { · 8 unmodified lines
909#define snprintf _snprintf909#define snprintf _snprintf
910#define vsnprintf _vsnprintf910#define vsnprintf _vsnprintf
911#ifndef __GNUC__911#ifndef __GNUC__
912 #define strtold (long double)strtod912# define strtold (long double)strtod
913 #define strtof (float)strtod913# define strtof (float)strtod
914 #define strtoll _strtoi64914# define strtoll _strtoi64
915 #define strtoull _strtoui64915# define strtoull _strtoui64
916#endif916#endif
917#else917#else
918/* XXX: need to define this to use them in non ISOC99 context */918/* XXX: need to define this to use them in non ISOC99 context */
tccelf.c+1−1
@@ -1835,7 +1835,7 @@ static int elf_output_file(TCCState *s1, const char *filename) · 1834 unmodified lines
1835 for(i = 1; i < s1->nb_sections; i++) {1835 for(i = 1; i < s1->nb_sections; i++) {
1836 s = s1->sections[i];1836 s = s1->sections[i];
1837 s->sh_name = put_elf_str(strsec, s->name);1837 s->sh_name = put_elf_str(strsec, s->name);
1838#if 0 //gr 1838#if 0 /* gr */
1839 printf("section: f=%08x t=%08x i=%08x %s %s\n", 1839 printf("section: f=%08x t=%08x i=%08x %s %s\n",
1840 s->sh_flags, 1840 s->sh_flags,
1841 s->sh_type, 1841 s->sh_type,
tccpe.c+1−1
@@ -30,7 +30,7 @@ · 29 unmodified lines
30#endif30#endif
31 31
32#define PE_MERGE_DATA32#define PE_MERGE_DATA
33// #define PE_PRINT_SECTIONS33/* #define PE_PRINT_SECTIONS */
34 34
35#ifdef TCC_TARGET_X86_6435#ifdef TCC_TARGET_X86_64
36# define ADDR3264 ULONGLONG36# define ADDR3264 ULONGLONG
win32/include/inttypes.h+1−1
@@ -239,7 +239,7 @@ typedef struct { · 238 unmodified lines
239#define SCNiPTR "i"239#define SCNiPTR "i"
240#define SCNoPTR "o"240#define SCNoPTR "o"
241#define SCNxPTR "x"241#define SCNxPTR "x"
242 #define SCNuPTR "u"242#define SCNuPTR "u"
243#endif243#endif
244 244
245#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L245#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
win32/include/stdio.h+10−10
@@ -241,8 +241,8 @@ extern FILE (*_imp___iob)[]; /* A pointer to an array of FILE */ · 240 unmodified lines
241 /* Make sure macros are not defined. */241 /* Make sure macros are not defined. */
242#pragma push_macro("vsnprintf")242#pragma push_macro("vsnprintf")
243#pragma push_macro("snprintf")243#pragma push_macro("snprintf")
244 #undef vsnprintf244# undef vsnprintf
245 #undef snprintf245# undef snprintf
246 extern246 extern
247 __attribute__((format(gnu_printf, 3, 0))) __attribute__((nonnull (3)))247 __attribute__((format(gnu_printf, 3, 0))) __attribute__((nonnull (3)))
248 int __mingw_vsnprintf(char *_DstBuf,size_t _MaxCount,const char *_Format,va_list _ArgList);248 int __mingw_vsnprintf(char *_DstBuf,size_t _MaxCount,const char *_Format,va_list _ArgList);
@@ -267,14 +267,14 @@ extern FILE (*_imp___iob)[]; /* A pointer to an array of FILE */ · 18 unmodified lines
267#pragma pop_macro("snprintf")267#pragma pop_macro("snprintf")
268#pragma pop_macro("vsnprintf")268#pragma pop_macro("vsnprintf")
269/* Check if vsnprintf and snprintf are defaulting to gnu-style. */269/* Check if vsnprintf and snprintf are defaulting to gnu-style. */
270 #if defined(USE_MINGW_GNU_SNPRINTF) && USE_MINGW_GNU_SNPRINTF270# if defined(USE_MINGW_GNU_SNPRINTF) && USE_MINGW_GNU_SNPRINTF
271 #ifndef vsnprint271# ifndef vsnprint
272 #define vsnprintf __mingw_vsnprintf272# define vsnprintf __mingw_vsnprintf
273 #endif273# endif
274 #ifndef snprintf274# ifndef snprintf
275 #define snprintf __mingw_snprintf275# define snprintf __mingw_snprintf
276 #endif276# endif
277 #endif277# endif
278 _CRTIMP int __cdecl _vscprintf(const char *_Format,va_list _ArgList);278 _CRTIMP int __cdecl _vscprintf(const char *_Format,va_list _ArgList);
279 _CRTIMP int __cdecl _set_printf_count_output(int _Value);279 _CRTIMP int __cdecl _set_printf_count_output(int _Value);
280 _CRTIMP int __cdecl _get_printf_count_output(void);280 _CRTIMP int __cdecl _get_printf_count_output(void);
win32/include/sys/stat.h+1−1
@@ -25,7 +25,7 @@ extern "C" { · 24 unmodified lines
25 25
26#include <sys/types.h>26#include <sys/types.h>
27 27
28#ifndef __TINYC__ //gr28#ifndef __TINYC__ /* gr */
29#ifdef _USE_32BIT_TIME_T29#ifdef _USE_32BIT_TIME_T
30#ifdef _WIN6430#ifdef _WIN64
31#undef _USE_32BIT_TIME_T31#undef _USE_32BIT_TIME_T
win32/include/sys/timeb.h+1−1
@@ -22,7 +22,7 @@ extern "C" { · 21 unmodified lines
22#define _CRTIMP __declspec(dllimport)22#define _CRTIMP __declspec(dllimport)
23#endif23#endif
24 24
25#ifndef __TINYC__ //gr25#ifndef __TINYC__ /* gr */
26#ifdef _USE_32BIT_TIME_T26#ifdef _USE_32BIT_TIME_T
27#ifdef _WIN6427#ifdef _WIN64
28#undef _USE_32BIT_TIME_T28#undef _USE_32BIT_TIME_T
win32/include/sys/types.h+1−1
@@ -12,7 +12,7 @@ · 11 unmodified lines
12 12
13#include <_mingw.h>13#include <_mingw.h>
14 14
15#ifndef __TINYC__ //gr15#ifndef __TINYC__ /* gr */
16#ifdef _USE_32BIT_TIME_T16#ifdef _USE_32BIT_TIME_T
17#ifdef _WIN6417#ifdef _WIN64
18#undef _USE_32BIT_TIME_T18#undef _USE_32BIT_TIME_T
win32/include/sys/utime.h+1−1
@@ -27,7 +27,7 @@ extern "C" { · 26 unmodified lines
27#define _WCHAR_T_DEFINED27#define _WCHAR_T_DEFINED
28#endif28#endif
29 29
30#ifndef __TINYC__ //gr30#ifndef __TINYC__ /* gr */
31#ifdef _USE_32BIT_TIME_T31#ifdef _USE_32BIT_TIME_T
32#ifdef _WIN6432#ifdef _WIN64
33#undef _USE_32BIT_TIME_T33#undef _USE_32BIT_TIME_T
win32/include/winapi/windef.h+1−1
@@ -110,7 +110,7 @@ extern "C" { · 109 unmodified lines
110 typedef DWORD *PDWORD;110 typedef DWORD *PDWORD;
111 typedef DWORD *LPDWORD;111 typedef DWORD *LPDWORD;
112 typedef void *LPVOID;112 typedef void *LPVOID;
113 #ifndef _LPCVOID_DEFINED113# ifndef _LPCVOID_DEFINED
114#define _LPCVOID_DEFINED114#define _LPCVOID_DEFINED
115typedef CONST void *LPCVOID;115typedef CONST void *LPCVOID;
116#endif116#endif
win32/include/winapi/winerror.h+2−2
@@ -1763,7 +1763,7 @@ · 1762 unmodified lines
1763#ifndef WSA_QOS_RESERVED_PETYPE1763#ifndef WSA_QOS_RESERVED_PETYPE
1764#define WSA_QOS_RESERVED_PETYPE 11031L1764#define WSA_QOS_RESERVED_PETYPE 11031L
1765#endif1765#endif
1766#endif // WSABASEERR1766#endif /* WSABASEERR */
1767 1767
1768#define ERROR_SXS_SECTION_NOT_FOUND 14000L1768#define ERROR_SXS_SECTION_NOT_FOUND 14000L
1769#define ERROR_SXS_CANT_GEN_ACTCTX 14001L1769#define ERROR_SXS_CANT_GEN_ACTCTX 14001L
@@ -3163,4 +3163,4 @@ __CRT_INLINE HRESULT HRESULT_FROM_WIN32(long x) { return x <= 0 ? (HRESULT)x : ( · 1393 unmodified lines
3163#define COMADMIN_E_SAFERINVALID _HRESULT_TYPEDEF_(0x80110822L)3163#define COMADMIN_E_SAFERINVALID _HRESULT_TYPEDEF_(0x80110822L)
3164#define COMADMIN_E_REGISTRY_ACCESSDENIED _HRESULT_TYPEDEF_(0x80110823L)3164#define COMADMIN_E_REGISTRY_ACCESSDENIED _HRESULT_TYPEDEF_(0x80110823L)
3165#define COMADMIN_E_PARTITIONS_DISABLED _HRESULT_TYPEDEF_(0x80110824L)3165#define COMADMIN_E_PARTITIONS_DISABLED _HRESULT_TYPEDEF_(0x80110824L)
3166#endif // _WINERROR_3166#endif /* _WINERROR_ */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t