Karl Schultz wrote: > Am getting these warnings in the Windows build: > > 2>Compiling... > 2>lex.yy.c > 2>program_lexer.l(327) : warning C4244: '=' : conversion from 'double' > to 'float', possible loss of data > 2>program_lexer.l(331) : warning C4244: '=' : conversion from 'double' > to 'float', possible loss of data > 2>program_lexer.l(335) : warning C4244: '=' : conversion from 'double' > to 'float', possible loss of data > 2>program_lexer.l(339) : warning C4244: '=' : conversion from 'double' > to 'float', possible loss of data > > The corresponding lines in program_lexer.l are: > > {num}?{frac}{exp}? { > yylval->real = _mesa_strtod(yytext, NULL); > return REAL; > } > {num}"."/[^.] { > yylval->real = _mesa_strtod(yytext, NULL); > return REAL; > } > {num}{exp} { > yylval->real = _mesa_strtod(yytext, NULL); > return REAL; > } > {num}"."{exp} { > yylval->real = _mesa_strtod(yytext, NULL); > return REAL; > } > > I think that we need to add a cast to these four places, e.g.: > > yylval->real = (float) _mesa_strtod(yytext, NULL); > > Changing progam_lexer.l requires that lex.yy.c (and others) be > regenerated with flex/bison and the generated files committed as well, > right? Is there a git trigger that does this, which would be really > cool? Or does someone need to run flex/bison manually and commit all > the resulting files? > > If the latter, I don't know the exact process and I'd guess that someone > routinely does this. > > If it is not a huge hassle, can someone add these casts to 7.8 and > master? The warnings are no big deal, but the casts do have some value > in documenting the implicit conversion.
I'll take care of it. It's up to the developer to regenerate the files and commit them (to avoid everyone needing flex/bison). -Brian ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev