# HG changeset patch # User David A. Holland # Date 1371434817 14400 # Node ID 2e1496dd96c45da12c00aeabd4d010afc9f2a279 # Parent 1cda505ddc78fdab303496e4be4e9aa66ba12f71 Don't recognize macro argument parens or commas within quotes. diff -r 1cda505ddc78 -r 2e1496dd96c4 CHANGES --- a/CHANGES Fri Jun 14 20:59:24 2013 -0400 +++ b/CHANGES Sun Jun 16 22:06:57 2013 -0400 @@ -3,6 +3,8 @@ already in a false block; it might not be valid. Reported by Baptiste Daroussin. - Don't recognize comments within character constants. + - Don't recognize macro argument parentheses or commas within strings, + or within character constants either. release 0.2 (20130611) - auto-recognize more builtin PowerPC and mips macros diff -r 1cda505ddc78 -r 2e1496dd96c4 macro.c --- a/macro.c Fri Jun 14 20:59:24 2013 -0400 +++ b/macro.c Sun Jun 16 22:06:57 2013 -0400 @@ -1108,21 +1108,21 @@ continue; } - if (buf[0] == '(') { + if (!inquote && buf[0] == '(') { expand_got_lparen(es, p, buf, 1); buf++; len--; continue; } - if (buf[0] == ')') { + if (!inquote && buf[0] == ')') { expand_got_rparen(es, p, buf, 1); buf++; len--; continue; } - if (buf[0] == ',') { + if (!inquote && buf[0] == ',') { expand_got_comma(es, p, buf, 1); buf++; len--;