diff --git a/arm-gen.c b/arm-gen.c index f85c263..f535a09 100644 --- a/arm-gen.c +++ b/arm-gen.c @@ -1783,7 +1783,7 @@ static uint32_t is_fconst() } /* generate a floating point operation 'v = t1 op t2' instruction. The - two operands are guaranted to have the same floating point type */ + two operands are guaranteed to have the same floating point type */ void gen_opf(int op) { uint32_t x, r, r2, c1, c2; diff --git a/elf.h b/elf.h index c3eab71..9fed6eb 100644 --- a/elf.h +++ b/elf.h @@ -232,7 +232,7 @@ typedef struct #define EM_FX66 66 /* Siemens FX66 microcontroller */ #define EM_ST9PLUS 67 /* STMicroelectronics ST9+ 8/16 mc */ -#define EM_ST7 68 /* STmicroelectronics ST7 8 bit mc */ +#define EM_ST7 68 /* STMicroelectronics ST7 8 bit mc */ #define EM_68HC16 69 /* Motorola MC68HC16 microcontroller */ #define EM_68HC11 70 /* Motorola MC68HC11 microcontroller */ #define EM_68HC08 71 /* Motorola MC68HC08 microcontroller */ @@ -817,7 +817,7 @@ typedef struct #define DF_1_EDITED 0x00200000 /* Object is modified after built. */ #define DF_1_NORELOC 0x00400000 #define DF_1_SYMINTPOSE 0x00800000 /* Object has individual interposers. */ -#define DF_1_GLOBAUDIT 0x01000000 /* Global auditin required. */ +#define DF_1_GLOBAUDIT 0x01000000 /* Global auditing required. */ #define DF_1_SINGLETON 0x02000000 /* Singleton symbols are used. */ /* Flags for the feature selection in DT_FEATURE_1. */ @@ -1313,7 +1313,7 @@ typedef struct #define R_SPARC_LM22 36 /* Low middle 22 bits of ... */ #define R_SPARC_PC_HH22 37 /* Top 22 bits of pc rel 64 bit */ #define R_SPARC_PC_HM10 38 /* High middle 10 bit of ... */ -#define R_SPARC_PC_LM22 39 /* Low miggle 22 bits of ... */ +#define R_SPARC_PC_LM22 39 /* Low middle 22 bits of ... */ #define R_SPARC_WDISP16 40 /* PC relative 16 bit shifted */ #define R_SPARC_WDISP19 41 /* PC relative 19 bit shifted */ #define R_SPARC_GLOB_JMP 42 /* was part of v9 ABI but was removed */ diff --git a/i386-gen.c b/i386-gen.c index 4924381..b9c3599 100644 --- a/i386-gen.c +++ b/i386-gen.c @@ -175,7 +175,7 @@ ST_FUNC void gen_addrpc32(int r, Sym *sym, int c) gen_le32(c - 4); } -/* generate a modrm reference. 'op_reg' contains the addtional 3 +/* generate a modrm reference. 'op_reg' contains the additional 3 opcode bits */ static void gen_modrm(int op_reg, int r, Sym *sym, int c) { diff --git a/lib/bcheck.c b/lib/bcheck.c index d0c1ae2..90f0ad2 100644 --- a/lib/bcheck.c +++ b/lib/bcheck.c @@ -244,7 +244,7 @@ BOUND_PTR_INDIR(16) #if defined(__GNUC__) && (__GNUC__ >= 6) /* - * At least gcc 6.2 complains when __builtin_frame_address is used whith + * At least gcc 6.2 complains when __builtin_frame_address is used with * nonzero argument. */ #pragma GCC diagnostic push diff --git a/tcc.h b/tcc.h index 06965eb..0a1de29 100644 --- a/tcc.h +++ b/tcc.h @@ -1453,7 +1453,7 @@ ST_FUNC int handle_eob(void); /* ------------ xxx-link.c ------------ */ -/* Wether to generate a GOT/PLT entry and when. NO_GOTPLT_ENTRY is first so +/* Whether to generate a GOT/PLT entry and when. NO_GOTPLT_ENTRY is first so that unknown relocation don't create a GOT or PLT entry */ enum gotplt_entry { NO_GOTPLT_ENTRY, /* never generate (eg. GLOB_DAT & JMP_SLOT relocs) */ diff --git a/tccgen.c b/tccgen.c index e6a56a7..02e40de 100644 --- a/tccgen.c +++ b/tccgen.c @@ -3637,7 +3637,7 @@ static void struct_layout(CType *type, AttributeDef *ad) if (bit_pos + bit_size <= size * 8 && f->c + size <= c) continue; - /* try to access the field using a differnt type */ + /* try to access the field using a different type */ c0 = -1, s = align = 1; for (;;) { px = f->c * 8 + bit_pos; diff --git a/tccpp.c b/tccpp.c index 7561b36..39386f4 100644 --- a/tccpp.c +++ b/tccpp.c @@ -2108,7 +2108,7 @@ static void parse_escape_string(CString *outstr, const uint8_t *buf, int is_long /* reference: The Unicode Standard, Version 10.0, ch3.9 */ int cont; /* count of continuation bytes */ - int skip; /* how many bytes should skip when error occured */ + int skip; /* how many bytes should skip when error occurred */ int i; /* decode leading byte */ @@ -3517,7 +3517,7 @@ no_subst: if (t == TOK_NOSUBST) nosubst = 1; } - /* GCC supports 'defined' as result of a macto substitution */ + /* GCC supports 'defined' as result of a macro substitution */ if (t == TOK_DEFINED && pp_expr) nosubst = 2; } diff --git a/tests/abitest.c b/tests/abitest.c index c4059d4..4a192bd 100644 --- a/tests/abitest.c +++ b/tests/abitest.c @@ -425,7 +425,7 @@ static int two_member_union_test(void) { } /* - * Win64 calling convetntion test. + * Win64 calling convention test. */ typedef struct many_struct_test_type_s {long long a, b, c;} many_struct_test_type; diff --git a/tests/pp/15.c b/tests/pp/15.c index d989bee..3bbc3ca 100644 --- a/tests/pp/15.c +++ b/tests/pp/15.c @@ -14,5 +14,5 @@ return n(0x1E)n(-1); // unlike gcc but correct XXX: return n(x)+n(x)-n(1)+n(1)-2; -// unlile gcc, but cannot appear in valid C +// unlike gcc, but cannot appear in valid C XXX: return n(x)n(x)n(1)n(2)n(x); diff --git a/tests/tcctest.c b/tests/tcctest.c index 2add498..7877243 100644 --- a/tests/tcctest.c +++ b/tests/tcctest.c @@ -384,7 +384,7 @@ void macro_test(void) MF_s("hi"); MF_t("hi"); - /* test macro substituion inside args (should not eat stream) */ + /* test macro substitution inside args (should not eat stream) */ printf("qq=%d\n", qq(qq)(2)); /* test zero argument case. NOTE: gcc 2.95.x does not accept a @@ -404,7 +404,7 @@ comment substituted */ TEST2(); - /* And again when the name and parenthes are separated by a + /* And again when the name and parentheses are separated by a comment. */ TEST2 /* the comment */ (); @@ -3117,7 +3117,7 @@ static __inline__ unsigned long long inc64(unsigned long long a) unsigned long long res; #ifdef __x86_64__ /* Using the A constraint is wrong, and increments are tested - elsewere. */ + elsewhere. */ res = a + 1; #else __asm__("addl $1, %%eax ; adcl $0, %%edx" : "=A" (res) : "A" (a)); diff --git a/tests/tests2/87_dead_code.c b/tests/tests2/87_dead_code.c index 92983f5..98d4566 100644 --- a/tests/tests2/87_dead_code.c +++ b/tests/tests2/87_dead_code.c @@ -9,7 +9,7 @@ static void kb_wait_1(void) /* Here the else arm is a statement expression that's supposed to be suppressed. The label inside the while would unsuppress code generation again if not handled correctly. And that - would wreak havok to the cond-expression because there's no + would wreak havoc to the cond-expression because there's no jump-around emitted, the whole statement expression really needs to not generate code (perhaps except useless forward jumps). */ (1 ? diff --git a/tests/tests2/90_struct-init.c b/tests/tests2/90_struct-init.c index ab33812..d931e23 100644 --- a/tests/tests2/90_struct-init.c +++ b/tests/tests2/90_struct-init.c @@ -60,7 +60,7 @@ struct U gu4 = { 3, {5,6,7,}, 5, { "bla", {44}} }; struct S gs3 = { (1), {(2)}, {(((3))), {4}}}; /* Superfluous braces, and leaving out braces for V.t, plus cast */ struct V gv = {{{3},4,{5,6}}, "haha", (u8)45, 46}; -/* Compund literal */ +/* Compound literal */ struct V gv2 = {(struct S){7,8,{9,10}}, {"hihi", 47}, 48}; /* Parens around compound literal */ struct V gv3 = {((struct S){7,8,{9,10}}), {"hoho", 49}, 50}; @@ -157,7 +157,7 @@ void foo (struct W *w, struct pkthdr *phdr_) struct S ls3 = { (1), (2), {(((3))), 4}}; /* Superfluous braces, and leaving out braces for V.t, plus cast */ struct V lv = {{3,4,{5,6}}, "haha", (u8)45, 46}; - /* Compund literal */ + /* Compound literal */ struct V lv2 = {(struct S)w->t.s, {"hihi", 47}, 48}; /* Parens around compound literal */ struct V lv3 = {((struct S){7,8,{9,10}}), ((const struct W *)w)->t.t, 50}; diff --git a/tests/tests2/99_fastcall.c b/tests/tests2/99_fastcall.c index 1ac8a5f..ee4b67d 100644 --- a/tests/tests2/99_fastcall.c +++ b/tests/tests2/99_fastcall.c @@ -89,10 +89,10 @@ struct trapframe { ///////////////////////////////////////////////////////////////////////// ////////// SAFECALL FRAMEWORK ///////////////////////////////////////////////////////////////////////// -// this framwork will convert any calling convention to cdecl +// this framework will convert any calling convention to cdecl // usage: first set call target with 'SET_SAFECALL_TARGET(x)' -// then cast 'SAFECALL' to target funtion pointer type and invoke it -// after calling, 'ESPDIFF' is the differance of old and new esp +// then cast 'SAFECALL' to target function pointer type and invoke it +// after calling, 'ESPDIFF' is the difference of old and new esp void *SYMBOL(sc_call_target); unsigned SYMBOL(sc_retn_addr); diff --git a/tests/tests2/Makefile b/tests/tests2/Makefile index 3ff60fd..6bff618 100644 --- a/tests/tests2/Makefile +++ b/tests/tests2/Makefile @@ -27,7 +27,7 @@ ifeq (-$(findstring gcc,$(CC))-,--) SKIP += $(patsubst %.expect,%.test,$(GEN-ALWAYS)) endif ifeq (-$(CONFIG_WIN32)-$(CONFIG_i386)$(CONFIG_arm)-,--yes-) - SKIP += 95_bitfields%.test # type_align is differnt on 32bit-non-windows + SKIP += 95_bitfields%.test # type_align is different on 32bit-non-windows endif # Some tests might need arguments diff --git a/win32/include/conio.h b/win32/include/conio.h index 6c1dc97..39f779e 100644 --- a/win32/include/conio.h +++ b/win32/include/conio.h @@ -194,7 +194,7 @@ extern "C" { } /* Register sizes are different between 32/64 bit mode. So we have to do this for _WIN64 and _WIN32 - seperatly. */ + separately. */ #ifdef _WIN64 __CRT_INLINE void __writecr0(unsigned __int64 Data) diff --git a/win32/include/math.h b/win32/include/math.h index 297184f..74add20 100644 --- a/win32/include/math.h +++ b/win32/include/math.h @@ -327,7 +327,7 @@ extern "C" { #define isinf(x) (fpclassify(x) == FP_INFINITE) /* 7.12.3.4 */ - /* We don't need to worry about trucation here: + /* We don't need to worry about truncation here: A NaN stays a NaN. */ #define isnan(x) (fpclassify(x) == FP_NAN) diff --git a/win32/include/stdint.h b/win32/include/stdint.h index cdebf44..cde32b6 100644 --- a/win32/include/stdint.h +++ b/win32/include/stdint.h @@ -178,7 +178,7 @@ typedef unsigned long long uintmax_t; /* 7.18.4.1 Macros for minimum-width integer constants - Accoding to Douglas Gwyn : + According to Douglas Gwyn : "This spec was changed in ISO/IEC 9899:1999 TC1; in ISO/IEC 9899:1999 as initially published, the expansion was required to be an integer constant of precisely matching type, which diff --git a/win32/include/values.h b/win32/include/values.h index 10e16a2..1cd643c 100644 --- a/win32/include/values.h +++ b/win32/include/values.h @@ -1,4 +1,4 @@ /* * TODO: Nothing here yet. Should provide UNIX compatibility constants - * comparible to those in limits.h and float.h. + * comparable to those in limits.h and float.h. */ diff --git a/x86_64-gen.c b/x86_64-gen.c index 72842d6..f4d86e1 100644 --- a/x86_64-gen.c +++ b/x86_64-gen.c @@ -314,14 +314,14 @@ static void gen_modrm_impl(int op_reg, int r, Sym *sym, int c, int is_got) } } -/* generate a modrm reference. 'op_reg' contains the addtional 3 +/* generate a modrm reference. 'op_reg' contains the additional 3 opcode bits */ static void gen_modrm(int op_reg, int r, Sym *sym, int c) { gen_modrm_impl(op_reg, r, sym, c, 0); } -/* generate a modrm reference. 'op_reg' contains the addtional 3 +/* generate a modrm reference. 'op_reg' contains the additional 3 opcode bits */ static void gen_modrm64(int opcode, int op_reg, int r, Sym *sym, int c) {