|
From: Lynn A. <l_d...@ad...> - 2006-04-15 14:23:37
|
With the DayOfWeek code I've been wrestling with, I get a compiler
warning from vc7.1 related to:
warning C4390: ';' : empty controlled statement found; is this the
intent?
because the following is generated, which ends up being a "nop":
if((YYLIMIT - YYCURSOR) < 9) YYFILL(9);
I've put #pragma statements around the code to remove the warning, but
was wondering if there was a better way.
#pragma warning(disable : 4390)
int CDowRegex::Match(void)
{
/*!re2c
("Sunday"|"Sun") { return 0; }
// bla bla bla
*/
}
#pragma warning(default : 4390)
One of the prominent "selling points" of re2c is that it claims to
generate warning free code. It is disconcerting to a newbie to have a
warning show up. ... at least it was to this newbie. That's not a
"confidence builder" to a newbie doing an evaluation of whether to
spend the time to learn and perhaps use re2c in their project.
BTW, there was also a warning show up in the simple.re example related
to unused variable. To a skeptical newbie, the homepage claims high
performance and warning free code, so you wonder how good the
performance is if the claim of warning free is overstated.
|