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
300300
301301 # documentation and man page
302302 tcc-doc.html: tcc-doc.texi
303− -texi2html -monolithic -number $<
303+ -texi2html -monolithic -number-sections $<
304304
305305 tcc.1: tcc-doc.texi
306306 -$(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 > $@
308308
309309 tcc-doc.info: tcc-doc.texi
310310 -makeinfo $<
arm-gen.c+2−2
@@ -24,7 +24,7 @@ · 23 unmodified lines
2424 #ifdef TARGET_DEFS_ONLY
2525
2626 #ifdef TCC_ARM_EABI
27−#ifndef TCC_ARM_VFP // Avoid useless warning
27+#ifndef TCC_ARM_VFP /* Avoid useless warning */
2828 #define TCC_ARM_VFP
2929 #endif
3030 #endif
@@ -104,7 +104,7 @@ enum { · 73 unmodified lines
104104
105105 /* defined if structures are passed as pointers. Otherwise structures
106106 are directly pushed on stack. */
107−//#define FUNC_STRUCT_PARAM_AS_PTR
107+/* #define FUNC_STRUCT_PARAM_AS_PTR */
108108
109109 /* pointer size, in bytes */
110110 #define PTR_SIZE 4
c67-gen.c+4−4
@@ -20,7 +20,7 @@ · 19 unmodified lines
2020
2121 #ifdef TARGET_DEFS_ONLY
2222
23−//#define ASSEMBLY_LISTING_C67
23+/* #define ASSEMBLY_LISTING_C67 */
2424
2525 /* number of available registers */
2626 #define NB_REGS 24
@@ -93,11 +93,11 @@ enum { · 66 unmodified lines
9393 #define REG_FRET TREG_C67_A4 /* float return register */
9494
9595 /* defined if function parameters must be evaluated in reverse order */
96−//#define INVERT_FUNC_PARAMS
96+/* #define INVERT_FUNC_PARAMS */
9797
9898 /* defined if structures are passed as pointers. Otherwise structures
9999 are directly pushed on stack. */
100−//#define FUNC_STRUCT_PARAM_AS_PTR
100+/* #define FUNC_STRUCT_PARAM_AS_PTR */
101101
102102 /* pointer size, in bytes */
103103 #define PTR_SIZE 4
@@ -253,7 +253,7 @@ void gsym(int t) · 149 unmodified lines
253253 #define C67_B3 107
254254 #define C67_FP 108
255255 #define C67_B2 109
256−#define C67_CREG_ZERO -1 // Special code for no condition reg test
256+#define C67_CREG_ZERO -1 /* Special code for no condition reg test */
257257
258258
259259 int ConvertRegToRegClass(int r)
coff.h+3−3
@@ -37,8 +37,8 @@ struct filehdr { · 36 unmodified lines
3737 #define F_BYTE_ORDER (F_LITTLE | F_BIG)
3838 #define FILHDR struct filehdr
3939
40−//#define FILHSZ sizeof(FILHDR)
41−#define FILHSZ 22 // above rounds to align on 4 bytes which causes problems
40+/* #define FILHSZ sizeof(FILHDR) */
41+#define FILHSZ 22 /* above rounds to align on 4 bytes which causes problems */
4242
4343 #define COFF_C67_MAGIC 0x00c2
4444
@@ -150,7 +150,7 @@ struct scnhdr { · 105 unmodified lines
150150 /*------------------------------------------------------------------------*/
151151 /* Define constants for names of "special" sections */
152152 /*------------------------------------------------------------------------*/
153−//#define _TEXT ".text"
153+/* #define _TEXT ".text" */
154154 #define _DATA ".data"
155155 #define _BSS ".bss"
156156 #define _CINIT ".cinit"
elf.h+2−2
@@ -1725,7 +1725,7 @@ typedef Elf32_Addr Elf32_Conflict; · 1724 unmodified lines
17251725 #define R_C60_GOTOFF 9 /* 32 bit offset to GOT */
17261726 #define R_C60_GOTPC 10 /* 32 bit PC relative offset to GOT */
17271727
1728−#define R_C60HI16 0x55 // high 16 bit MVKH embedded
1729−#define R_C60LO16 0x54 // low 16 bit MVKL embedded
1728+#define R_C60HI16 0x55 /* high 16 bit MVKH embedded */
1729+#define R_C60LO16 0x54 /* low 16 bit MVKL embedded */
17301730
17311731 #endif /* elf.h */
i386-asm.c+1−1
@@ -21,7 +21,7 @@ · 20 unmodified lines
2121
2222 #include "tcc.h"
2323
24−// #define NB_ASM_REGS 8
24+/* #define NB_ASM_REGS 8 */
2525 #define MAX_OPERANDS 3
2626 #define NB_SAVED_REGS 3
2727
i386-gen.c+1−1
@@ -55,7 +55,7 @@ enum { · 54 unmodified lines
5555
5656 /* defined if structures are passed as pointers. Otherwise structures
5757 are directly pushed on stack. */
58−//#define FUNC_STRUCT_PARAM_AS_PTR
58+/* #define FUNC_STRUCT_PARAM_AS_PTR */
5959
6060 /* pointer size, in bytes */
6161 #define PTR_SIZE 4
il-gen.c+2−2
@@ -53,11 +53,11 @@ const int reg_classes[NB_REGS] = { · 52 unmodified lines
5353 #define REG_FRET REG_ST0 /* float return register */
5454
5555 /* defined if function parameters must be evaluated in reverse order */
56−//#define INVERT_FUNC_PARAMS
56+/* #define INVERT_FUNC_PARAMS */
5757
5858 /* defined if structures are passed as pointers. Otherwise structures
5959 are directly pushed on stack. */
60−//#define FUNC_STRUCT_PARAM_AS_PTR
60+/* #define FUNC_STRUCT_PARAM_AS_PTR */
6161
6262 /* pointer size, in bytes */
6363 #define PTR_SIZE 4
lib/bcheck.c+2−2
@@ -29,11 +29,11 @@ · 28 unmodified lines
2929 #include <unistd.h>
3030 #endif
3131
32−//#define BOUND_DEBUG
32+/* #define BOUND_DEBUG */
3333
3434 /* define so that bound array is static (faster, but use memory if
3535 bound checking not used) */
36−//#define BOUND_STATIC
36+/* #define BOUND_STATIC */
3737
3838 /* use malloc hooks. Currently the code cannot be reliable if no hooks */
3939 #define CONFIG_TCC_MALLOC_HOOKS
libtcc.c+1−1
@@ -1018,7 +1018,7 @@ LIBTCCAPI TCCState *tcc_new(void) · 1017 unmodified lines
10181018 s->char_is_unsigned = 1;
10191019 #endif
10201020 /* enable this if you want symbols with leading underscore on windows: */
1021−#if 0 //def TCC_TARGET_PE
1021+#if 0 /* def TCC_TARGET_PE */
10221022 s->leading_underscore = 1;
10231023 #endif
10241024 #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
388388 @section ISOC99 extensions
389389
390390 TCC implements many features of the new C standard: ISO C99. Currently
391−missing items are: complex and imaginary numbers and variable length
392−arrays.
391+missing items are: complex and imaginary numbers.
393392
394393 Currently implemented ISOC99 features:
395394
396395 @itemize
397396
397+@item variable length arrays.
398+
398399 @item 64 bit @code{long long} types are fully supported.
399400
400401 @item The boolean type @code{_Bool} is supported.
tcc.h+14−14
@@ -98,21 +98,21 @@ · 97 unmodified lines
9898 #include "libtcc.h"
9999
100100 /* parser debug */
101−//#define PARSE_DEBUG
101+/* #define PARSE_DEBUG */
102102 /* preprocessor debug */
103−//#define PP_DEBUG
103+/* #define PP_DEBUG */
104104 /* include file debug */
105−//#define INC_DEBUG
105+/* #define INC_DEBUG */
106106 /* memory leak debug */
107−//#define MEM_DEBUG
107+/* #define MEM_DEBUG */
108108 /* assembler debug */
109−//#define ASM_DEBUG
109+/* #define ASM_DEBUG */
110110
111111 /* target selection */
112−//#define TCC_TARGET_I386 /* i386 code generator */
113−//#define TCC_TARGET_ARM /* ARMv4 code generator */
114−//#define TCC_TARGET_C67 /* TMS320C67xx code generator */
115−//#define TCC_TARGET_X86_64 /* x86-64 code generator */
112+/* #define TCC_TARGET_I386 *//* i386 code generator */
113+/* #define TCC_TARGET_ARM *//* ARMv4 code generator */
114+/* #define TCC_TARGET_C67 *//* TMS320C67xx code generator */
115+/* #define TCC_TARGET_X86_64 *//* x86-64 code generator */
116116
117117 /* default target is I386 */
118118 #if !defined(TCC_TARGET_I386) && !defined(TCC_TARGET_ARM) && \
@@ -894,7 +894,7 @@ struct TCCState { · 775 unmodified lines
894894 DEF_ASM(x ## nle) \
895895 DEF_ASM(x ## g)
896896
897−#endif // defined TCC_TARGET_I386 || defined TCC_TARGET_X86_64
897+#endif /* defined TCC_TARGET_I386 || defined TCC_TARGET_X86_64 */
898898
899899 enum tcc_token {
900900 TOK_LAST = TOK_IDENT - 1,
@@ -909,10 +909,10 @@ enum tcc_token { · 8 unmodified lines
909909 #define snprintf _snprintf
910910 #define vsnprintf _vsnprintf
911911 #ifndef __GNUC__
912− #define strtold (long double)strtod
913− #define strtof (float)strtod
914− #define strtoll _strtoi64
915− #define strtoull _strtoui64
912+# define strtold (long double)strtod
913+# define strtof (float)strtod
914+# define strtoll _strtoi64
915+# define strtoull _strtoui64
916916 #endif
917917 #else
918918 /* 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
18351835 for(i = 1; i < s1->nb_sections; i++) {
18361836 s = s1->sections[i];
18371837 s->sh_name = put_elf_str(strsec, s->name);
1838−#if 0 //gr
1838+#if 0 /* gr */
18391839 printf("section: f=%08x t=%08x i=%08x %s %s\n",
18401840 s->sh_flags,
18411841 s->sh_type,
tccpe.c+1−1
@@ -30,7 +30,7 @@ · 29 unmodified lines
3030 #endif
3131
3232 #define PE_MERGE_DATA
33−// #define PE_PRINT_SECTIONS
33+/* #define PE_PRINT_SECTIONS */
3434
3535 #ifdef TCC_TARGET_X86_64
3636 # define ADDR3264 ULONGLONG
win32/include/inttypes.h+1−1
@@ -239,7 +239,7 @@ typedef struct { · 238 unmodified lines
239239 #define SCNiPTR "i"
240240 #define SCNoPTR "o"
241241 #define SCNxPTR "x"
242− #define SCNuPTR "u"
242+#define SCNuPTR "u"
243243 #endif
244244
245245 #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
241241 /* Make sure macros are not defined. */
242242 #pragma push_macro("vsnprintf")
243243 #pragma push_macro("snprintf")
244− #undef vsnprintf
245− #undef snprintf
244+# undef vsnprintf
245+# undef snprintf
246246 extern
247247 __attribute__((format(gnu_printf, 3, 0))) __attribute__((nonnull (3)))
248248 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
267267 #pragma pop_macro("snprintf")
268268 #pragma pop_macro("vsnprintf")
269269 /* Check if vsnprintf and snprintf are defaulting to gnu-style. */
270− #if defined(USE_MINGW_GNU_SNPRINTF) && USE_MINGW_GNU_SNPRINTF
271− #ifndef vsnprint
272− #define vsnprintf __mingw_vsnprintf
273− #endif
274− #ifndef snprintf
275− #define snprintf __mingw_snprintf
276− #endif
277− #endif
270+# if defined(USE_MINGW_GNU_SNPRINTF) && USE_MINGW_GNU_SNPRINTF
271+# ifndef vsnprint
272+# define vsnprintf __mingw_vsnprintf
273+# endif
274+# ifndef snprintf
275+# define snprintf __mingw_snprintf
276+# endif
277+# endif
278278 _CRTIMP int __cdecl _vscprintf(const char *_Format,va_list _ArgList);
279279 _CRTIMP int __cdecl _set_printf_count_output(int _Value);
280280 _CRTIMP int __cdecl _get_printf_count_output(void);
win32/include/sys/stat.h+1−1
@@ -25,7 +25,7 @@ extern "C" { · 24 unmodified lines
2525
2626 #include <sys/types.h>
2727
28−#ifndef __TINYC__ //gr
28+#ifndef __TINYC__ /* gr */
2929 #ifdef _USE_32BIT_TIME_T
3030 #ifdef _WIN64
3131 #undef _USE_32BIT_TIME_T
win32/include/sys/timeb.h+1−1
@@ -22,7 +22,7 @@ extern "C" { · 21 unmodified lines
2222 #define _CRTIMP __declspec(dllimport)
2323 #endif
2424
25−#ifndef __TINYC__ //gr
25+#ifndef __TINYC__ /* gr */
2626 #ifdef _USE_32BIT_TIME_T
2727 #ifdef _WIN64
2828 #undef _USE_32BIT_TIME_T
win32/include/sys/types.h+1−1
@@ -12,7 +12,7 @@ · 11 unmodified lines
1212
1313 #include <_mingw.h>
1414
15−#ifndef __TINYC__ //gr
15+#ifndef __TINYC__ /* gr */
1616 #ifdef _USE_32BIT_TIME_T
1717 #ifdef _WIN64
1818 #undef _USE_32BIT_TIME_T
win32/include/sys/utime.h+1−1
@@ -27,7 +27,7 @@ extern "C" { · 26 unmodified lines
2727 #define _WCHAR_T_DEFINED
2828 #endif
2929
30−#ifndef __TINYC__ //gr
30+#ifndef __TINYC__ /* gr */
3131 #ifdef _USE_32BIT_TIME_T
3232 #ifdef _WIN64
3333 #undef _USE_32BIT_TIME_T
win32/include/winapi/windef.h+1−1
@@ -110,7 +110,7 @@ extern "C" { · 109 unmodified lines
110110 typedef DWORD *PDWORD;
111111 typedef DWORD *LPDWORD;
112112 typedef void *LPVOID;
113− #ifndef _LPCVOID_DEFINED
113+# ifndef _LPCVOID_DEFINED
114114 #define _LPCVOID_DEFINED
115115 typedef CONST void *LPCVOID;
116116 #endif
win32/include/winapi/winerror.h+2−2
@@ -1763,7 +1763,7 @@ · 1762 unmodified lines
17631763 #ifndef WSA_QOS_RESERVED_PETYPE
17641764 #define WSA_QOS_RESERVED_PETYPE 11031L
17651765 #endif
1766−#endif // WSABASEERR
1766+#endif /* WSABASEERR */
17671767
17681768 #define ERROR_SXS_SECTION_NOT_FOUND 14000L
17691769 #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
31633163 #define COMADMIN_E_SAFERINVALID _HRESULT_TYPEDEF_(0x80110822L)
31643164 #define COMADMIN_E_REGISTRY_ACCESSDENIED _HRESULT_TYPEDEF_(0x80110823L)
31653165 #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