Update of /cvsroot/monetdb/sql/src/server
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv17011/src/server
Modified Files:
sql_parser.mx
Log Message:
avoiding more implicit down-casts with "possible loss of data"
as found by the Microsoft compiler:
- replacing "lng bval" by "int bval"
- turning implicit cast from lng to int
into explict one with overflow check (assertion)
U sql_parser.mx
Index: sql_parser.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/sql_parser.mx,v
retrieving revision 1.289
retrieving revision 1.290
diff -u -d -r1.289 -r1.290
--- sql_parser.mx 7 Sep 2008 10:00:32 -0000 1.289
+++ sql_parser.mx 7 Sep 2008 21:48:50 -0000 1.290
@@ -248,8 +248,8 @@
/* reentrant parser */
%pure_parser
%union {
- int i_val;
- lng l_val,operation,bval;
+ int i_val,bval;
+ lng l_val,operation;
double fval;
char * sval;
symbol* sym;
@@ -4412,7 +4412,9 @@
tpe->type->localtype == TYPE_int ||
tpe->type->localtype == TYPE_sht ||
tpe->type->localtype == TYPE_bte ) {
- $$ = stack_get_number(m, name);
+ lng sgn = stack_get_number(m, name);
+ assert((lng) GDK_int_min <= sgn && sgn <= (lng)
GDK_int_max);
+ $$ = (int) sgn;
} else {
char *msg = sql_message("constant (%s) has wrong type
(number expected)", $1);
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins