<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Sep 24, 2010, at 6:03 AM, Joel Sherrill wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">The first is this which looks like a quoted string on the command<br>line is getting mangled:<br><br>/usr/lib/clang-analyzer/scan-build/ccc-analyzer<br>-DPACKAGE_NAME=\"rtems-c-src\" -DPACKAGE_TARNAME=\"rtems-c-src\"<br>-DPACKAGE_VERSION=\"4.10.99.0\" -DPACKAGE_STRING=\"rtems-c-src\<br>4.10.99.0\" -DPACKAGE_BUGREPORT=\"<a href="http://www.rtems.org/bugzilla/">http://www.rtems.org/bugzilla\</a>"<br>-DPACKAGE_URL=\"\" -DCPU_U32_FIX=1 -I.<br>-I/home/joel/rtems-4.11-work/build/rtems/c/src/optman<br>-I../../../sis/lib/include   -mcpu=cypress -O2 -g -Wall<br>-Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs -MT<br>rtems/no_timer_rel-no-timer.o -MD -MP -MF<br>rtems/.deps/no_timer_rel-no-timer.Tpo -c -o<br>rtems/no_timer_rel-no-timer.o `test -f 'rtems/no-timer.c' || echo<br>'/home/joel/rtems-4.11-work/build/rtems/c/src/optman/'`rtems/no-timer.c<br>error: error reading '4.10.99.0"'<br>In file included from <built-in>:109:<br><command line>:5:24: error: missing terminating '"' character<br>#define PACKAGE_STRING "rtems-c-src<br>                        ^<br><br>This is from this -D option...<br><br>-DPACKAGE_STRING=\"rtems-c-src\ 4.10.99.0\"<br><br>Notice that there is an embedded space in the right hand side of the<br>-DPACKAGE_STRING which is causing the parsing of the command line to break.</span></blockquote></div><br><div>Hi Joel,</div><div><br></div><div>I looked into this issue.  The error is coming from the compiler, which is directly forwarded the arguments (with no extra interpretation) from ccc-analyzer.  I'm not certain where the issue is, because I see this problem even when just using the compiler directly (and not using scan-build).  For example:</div><div><br></div><div>$ touch t.c</div><div>$ cat Makefile </div><div><div>t.o:</div><div><span class="Apple-tab-span" style="white-space:pre">   </span>$(CC) -DFOO=\"Foo Bar\" -c t.c</div><div><br></div><div>clean:</div><div><span class="Apple-tab-span" style="white-space:pre">       </span>rm -f t.o</div><div><br></div><div>all: t.o</div></div><div><br></div><div>$ CC=gcc make</div><div><div>gcc -DFOO=\"Foo Bar\" -c t.c</div><div>i686-apple-darwin11-gcc-4.2.1: Bar": No such file or directory</div><div><command-line>: warning: missing terminating " character</div><div>make: *** [t.o] Error 1</div></div><div><br></div><div><br></div><div>Note that if I change the relevant line in the Makefile to:</div><div><br></div><div><div>t.o:</div><div>        $(CC) -DFOO='"Foo Bar"' -c t.c</div><div><br></div></div><div><br></div><div>the problem goes away.</div><div><br></div></body></html>