Package: tcc Version: 0.9.24~cvs20070502-1 Followup-For: Bug #435027 This patch seems to handler the bug described here. If something is wrong, either because it detect errors when there isn't or because it doesn't detect error when there is, please report and we'll upgrade the patch.
Anyway this is a temporary patch since it adds a global variable in file tcc.c -- System Information: Debian Release: lenny/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.6.22.gary.1 (SMP w/1 CPU core) Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages tcc depends on: ii libc6 2.6.1-1 GNU C Library: Shared libraries Versions of packages tcc recommends: ii libc6-dev [libc-dev] 2.6.1-1 GNU C Library: Development Librari -- no debconf information
diff -Naur tcc.orig/tcc.c tcc/tcc.c --- tcc.orig/tcc.c 2007-06-25 16:02:41.000000000 +0200 +++ tcc/tcc.c 2007-08-24 23:20:55.000000000 +0200 @@ -312,6 +312,7 @@ #define CACHED_INCLUDES_HASH_SIZE 512 /* parser */ +static int in_macro = 0; static struct BufferedFile *file; static int ch, tok; static CValue tokc; @@ -3569,7 +3570,7 @@ break; case '\n': - if (parse_flags & PARSE_FLAG_LINEFEED) { + if ((parse_flags & PARSE_FLAG_LINEFEED) && (!in_macro)) { tok = TOK_LINEFEED; } else { file->line_num++; @@ -4110,7 +4111,8 @@ } if (t != '(') /* no macro subst */ return -1; - + in_macro++; + /* argument macro */ next_nomacro(); next_nomacro(); @@ -4146,8 +4148,10 @@ var arg argument if it is omitted */ if (sa && sa->type.t && gnu_ext) continue; - else + else { + in_macro++; break; + } } if (tok != ',') expect(",");
signature.asc
Description: This is a digitally signed message part.