Mercurial > hg > qcc
changeset 334:b6ce0b012b60
[project @ 2004-10-28 21:14:30 by bellard]
fixed const and volatile function parameters typing - fixed string parsing when skipping code
author | bellard |
---|---|
date | Thu, 28 Oct 2004 21:14:30 +0000 |
parents | a7b6042083f5 |
children | a3d817295f8d |
files | tcc.c |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/tcc.c Thu Oct 28 21:13:47 2004 +0000 +++ b/tcc.c Thu Oct 28 21:14:30 2004 +0000 @@ -2061,7 +2061,8 @@ } else if (c == '\r') { PEEKC_EOB(c, p); if (c != '\n') { - cstr_ccat(str, '\r'); + if (str) + cstr_ccat(str, '\r'); } else { file->line_num++; goto add_char; @@ -6621,6 +6622,9 @@ function pointer) */ static inline void convert_parameter_type(CType *pt) { + /* remove const and volatile qualifiers (XXX: const could be used + to indicate a const function parameter */ + pt->t &= ~(VT_CONSTANT | VT_VOLATILE); /* array must be transformed to pointer according to ANSI C */ pt->t &= ~VT_ARRAY; if ((pt->t & VT_BTYPE) == VT_FUNC) {