<html><head></head><body>I think switching to c99 per default is a great idea. The problem below should be fixed by <a href="http://review.coreboot.org/#/c/11666">http://review.coreboot.org/#/c/11666</a>/ and the following patch.<br clear="none">
<br clear="none">
Stefan<br clear="none"><br clear="none"><div class="gmail_quote">On Oct 19, 2015, Julius Werner <jwerner@chromium.org> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k10mail">> is there anyway to dynamic define std to gnu99 when detect build with cygwin?<br clear="none"><br clear="none">cbfstool is already defining -std=c99. I don't see a strong reason why<br clear="none">we shouldn't just change that to gnu99 globally.<br clear="none"><br clear="none"></pre><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;">2. default build will error as below,<br clear="none">HOSTCC     cbfstool/cbfstool.o<br clear="none">/cygdrive/d/FW/coreboot/util/cbfstool/cbfstool.c: In function 'main':<br clear="none">/cygdrive/d/FW/coreboot/util/cbfstool/cbfstool.c:1075:5: error: array<br clear="none">subscript has type 'char' [-Werror=char-subscripts]<br
clear="none">if (tolower(suffix[0])=='k') {<br clear="none">^</blockquote><br clear="none"></blockquote></blockquote>This sounds like an bug in cygwin and you should file it with them.<br clear="none">They're probably implementing tolower() in their standard header as a<br clear="none">macro which directly indexes an array with an argument. They should at<br clear="none">least be casting the argument inside that macro or they are not<br clear="none">POSIX-compliant.<br clear="none"><br clear="none"></blockquote></div><br clear="none">-- 
Sent with <a shape="rect" href="https://play.google.com/store/apps/details?id=com.onegravity.k10.pro2"><b>K-@ Mail</b></a> - the evolution of emailing.</body></html>