Changeset: 038c40e92e3f for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=038c40e92e3f Modified Files: NT/rules.msc configure.ag Branch: default Log Message:
Merge with Aug2011 branch. diffs (truncated from 328 to 300 lines): diff --git a/NT/rules.msc b/NT/rules.msc --- a/NT/rules.msc +++ b/NT/rules.msc @@ -196,10 +196,8 @@ ZI = -ZI !ENDIF COMPILERFLAGS = -GF -W3 $(W_CFLAGS) -wd4273 -wd4102 -MDd -nologo -Od -D_DEBUG -RTC1 $(ZI) -NO_INLINE_CFLAGS = !ELSE COMPILERFLAGS = -GF -W3 $(W_CFLAGS) -wd4273 -wd4102 -MD -nologo -Ox -NO_INLINE_CFLAGS = -Od -Ob0gysi- !ENDIF CFLAGS = $(COMPILERFLAGS) -I. -I$(TOPDIR) $(LIBC_INCS) $(INCLUDES) $(WINCONFIG_INCS) $(ICONV_CFLAGS) diff --git a/buildtools/conf/rules.mk b/buildtools/conf/rules.mk --- a/buildtools/conf/rules.mk +++ b/buildtools/conf/rules.mk @@ -118,15 +118,6 @@ %.eps: %.feps $(CP) $< $@ -$(patsubst %.mx,%.lo,$(filter %.mx,$(NO_OPTIMIZE_FILES))): %.lo: %.c - $(LTCOMPILE) -c -o $@ $(CFLAGS_NO_OPT) $< - -$(patsubst %.c,%.o,$(filter %.c,$(NO_OPTIMIZE_FILES))): %.o: %.c - $(COMPILE) $(CFLAGS_NO_OPT) -c $< - -$(patsubst %.c,%.lo,$(filter %.c,$(NO_OPTIMIZE_FILES))): %.lo: %.c - $(LTCOMPILE) -c -o $@ $(CFLAGS_NO_OPT) $< - SUFFIXES-local: $(BUILT_SOURCES) distdir: check_dist diff --git a/configure.ag b/configure.ag --- a/configure.ag +++ b/configure.ag @@ -524,12 +524,8 @@ dnl i.e., at the end of this configure[.ag] script. dnl Only GNU (gcc) and Intel ([ie]cc/[ie]cpc on Linux) are done so far. : ${X_CFLAGS=} # initialize to empty if not set -NO_INLINE_CFLAGS="" -GCC_BISON_CFLAGS="" -ICC_BISON_CFLAGS="" GCC_SWIG_CFLAGS="" ICC_SWIG_CFLAGS="" -CFLAGS_NO_OPT="-O0" if test "x$enable_strict" = xyes; then case "$GCC-$CC-$host_os" in yes-*-*) @@ -674,22 +670,6 @@ ;; esac - dnl Some versions of bison seem to generate code - dnl that does not compile with `gcc -Wundef`; - dnl we use GCC_BISON_CFLAGS to disable the respective warning as - dnl locally as possible via "-Wno-undef" - dnl (see also sql/server/Makefile.ag). - GCC_BISON_CFLAGS="$GCC_BISON_CFLAGS -Wno-undef" - dnl Likewise, at least with gcc 4.3.0 and bison 2.3 on Gentoo 1.12.11.1, - dnl gcc complains about some bison-generated code that defines an unused static function: - dnl "warning: 'input' defined but not used". - case "$CC-$gcc_ver" in - *clang*-*) - ;; - *-4.[[3-9]]*|*-[[5-9]].*) - GCC_BISON_CFLAGS="$GCC_BISON_CFLAGS -Wno-unused-function";; - esac - dnl ... however, some things are beyond our control: case $host_os in solaris*|aix*) dnl In some cases, there is a (possibly) uninitialized @@ -751,9 +731,6 @@ CFLAGS="$CFLAGS -fno-strict-aliasing" ;; esac - - - NO_INLINE_CFLAGS="-fno-inline -fno-inline-functions" ;; -*icc*-linux*|-*ecc*-linux*) dnl Intel ([ie]cc/[ie]cpc on Linux) @@ -817,26 +794,6 @@ dnl #1599: declaration hides variable dnl #2259: non-pointer conversion from "." to "." may lose significant bits - dnl (At least on Fedora Core 4,) bison 2.0 seems to generate code - dnl that icc does not like; since the problem only occurs with - dnl sql/server/sql_parser.mx, - dnl we use ICC_BISON_CFLAGS - dnl to disable the respective warning as locally as possible - dnl (see also sql/server/Makefile.ag). - case "`bison -V | head -n1`" in - *2.0*) - ICC_BISON_CFLAGS="$ICC_BISON_CFLAGS -wd592" - dnl # 592: variable "." is used before its value is set - ;; - esac - - dnl Some versions of bison seem to generate code that icc does not like; - dnl we use ICC_BISON_CFLAGS to disable the respective warning as - dnl locally as possible via "-wd177" - dnl (#177: label "." was declared but never referenced) - dnl (see also sql/server/Makefile.ag). - ICC_BISON_CFLAGS="$ICC_BISON_CFLAGS -wd177" - dnl Intel's icc does not like to compile swig-generated code dnl (at least not with our strict X_CFLAGS), complaining about dnl 'error #869: parameter "..." was never referenced', @@ -846,8 +803,6 @@ dnl as locally as possbile via "-wd869 -wd177 -wd310" dnl (see also clients/perl/Cimpl/Makefile.ag). ICC_SWIG_CFLAGS="$ICC_SWIG_CFLAGS -wd869 -wd177 -wd310" - - NO_INLINE_CFLAGS="-fno-inline -fno-inline-functions" ;; -*pgcc*-linux*) dnl Portland Group (PGI) (pgcc/pgCC on Linux) @@ -883,7 +838,6 @@ dnl some dirty hacks THREAD_SAVE_FLAGS="\$(thread_safe_flag_spec) -D_REENTRANT" # only needed in monet -NO_OPTIMIZE_FILES="" case "$host_os" in solaris*) case "$GCC" in @@ -898,12 +852,6 @@ case "$GCC" in yes) THREAD_SAVE_FLAGS="$THREAD_SAVE_FLAGS -mthreads" - dnl With "-On" (n>0), compilation of monet_multiplex.mx fails on sara's solo with - dnl "Assembler: /tmp/cc8qluZf.s: line 33198: Displacement must be divisible by 4.". - dnl Likewise, the MIL parser does not work correctly, unless compile monet_parse.yy.c - dnl without optimization (i.e., with "$(CFLAGS_NO_OPT)"). - dnl Hence: - NO_OPTIMIZE_FILES="monet_multiplex.mx monet_parse.yy.mx" ;; *) THREAD_SAVE_FLAGS="$THREAD_SAVE_FLAGS -qthreaded" @@ -913,7 +861,6 @@ esac AC_SUBST(thread_safe_flag_spec) AC_SUBST(THREAD_SAVE_FLAGS) -AC_SUBST(NO_OPTIMIZE_FILES) AC_PROG_INSTALL AC_LIBTOOL_DLOPEN @@ -1264,14 +1211,12 @@ case "$host-$icc_ver" in dnl handle non-Intel compilers ($icc_ver=""), first *solaris*-) CFLAGS="$CFLAGS -xO5" - CFLAGS_NO_OPT="-xO0" ;; # *irix*-) CFLAGS="$CFLAGS -O3 -Ofast=IP27 -OPT:alias=restrict -IPA" *irix*-) CFLAGS="$CFLAGS -O3 -OPT:div_split=ON:fast_complex=ON:fast_exp=ON:fast_nint=ON:Olimit=2147483647:roundoff=3 -TARG:processor=r10k -IPA" LDFLAGS="$LDFLAGS -IPA" ;; *aix*-) CFLAGS="$CFLAGS -O3" - NO_INLINE_CFLAGS="$NO_INLINE_CFLAGS -qnooptimize" ;; *-*-*-) CFLAGS="$CFLAGS -O2" ;; @@ -1321,7 +1266,6 @@ # ia64-*-*-10.*) CFLAGS="$CFLAGS -restrict " # ia64-*-*-10.*) CFLAGS="$CFLAGS -unroll " # ia64-*-*-10.*) CFLAGS="$CFLAGS -mcpu=itanium2" - NO_INLINE_CFLAGS="$NO_INLINE_CFLAGS -O0" ;; i*86-*-*) CFLAGS="$CFLAGS -mp1 -O3 -restrict -unroll -ipo -ipo_obj -tpp6 -axiMKW";; @@ -1355,10 +1299,6 @@ else AC_MSG_RESULT([no]) fi -AC_SUBST(CFLAGS_NO_OPT) -AC_SUBST(NO_INLINE_CFLAGS) -AC_SUBST(GCC_BISON_CFLAGS) -AC_SUBST(ICC_BISON_CFLAGS) AC_SUBST(GCC_SWIG_CFLAGS) AC_SUBST(ICC_SWIG_CFLAGS) diff --git a/gdk/Makefile.ag b/gdk/Makefile.ag --- a/gdk/Makefile.ag +++ b/gdk/Makefile.ag @@ -19,9 +19,6 @@ INCLUDES = ../common/options ../common/stream ../common/utils $(valgrind_CFLAGS) -gdk_scanselect_CFLAGS = $(NO_INLINE_CFLAGS) -# gdk_relop.mx - EXTRA_DIST = gdk_scanselect_defs.mx gdk_private.h gdk_delta.h gdk_logger.h gdk_posix.h gdk_system.h gdk_tm.h gdk_storage.h lib_gdk = { diff --git a/sql/server/Makefile.ag b/sql/server/Makefile.ag --- a/sql/server/Makefile.ag +++ b/sql/server/Makefile.ag @@ -25,21 +25,6 @@ YFLAGS = -d -p sql -# Some versions of flex & bison seem to generate code -# that does not compile with `gcc -Wundef`; -# we use GCC_BISON_CFLAGS to disable the respective warning as -# locally as possible via "-Wno-undef" -# (see also configure.ag). -# -# (At least on Fedora Core 4,) bison 2.0 seems to generate code -# that icc does not like; since the problem only occurs with -# sql/src/server/sql_parser.y, -# we use ICC_BISON_CFLAGS -# to disable the respective warning as locally as possible -# via "-wd592" (#592: variable "." is used before its value is set) -# (see also configure.ag). -CFLAGS = $(ICC_BISON_CFLAGS) $(GCC_BISON_CFLAGS) - lib_sqlserver = { NOINST DIR = libdir diff --git a/sql/server/sql_semantic.c b/sql/server/sql_semantic.c --- a/sql/server/sql_semantic.c +++ b/sql/server/sql_semantic.c @@ -751,6 +751,9 @@ return NULL; if (b) { char *o = b; + b = strconcat(b,"."); + _DELETE(o); + o = b; b = strconcat(b,s); _DELETE(o); _DELETE(s); @@ -775,9 +778,11 @@ len = snprintf( buf+len, BUFSIZ-len, "%s(", op); for (; ops; ops = ops->next) { - char *tmp; + char *tmp = symbol2string(sql, ops->data.sym, err); + if (tmp == NULL) + return NULL; len = snprintf( buf+len, BUFSIZ-len, "%s%s", - tmp = symbol2string(sql, ops->data.sym, err), + tmp, (ops->next)?",":""); _DELETE(tmp); } @@ -786,8 +791,16 @@ case SQL_BINOP: { dnode *lst = se->data.lval->h; char *op = qname_fname(lst->data.lval); - char *l = symbol2string(sql, lst->next->data.sym, err); - char *r = symbol2string(sql, lst->next->next->data.sym, err); + char *l; + char *r; + l = symbol2string(sql, lst->next->data.sym, err); + if (l == NULL) + return NULL; + r = symbol2string(sql, lst->next->next->data.sym, err); + if (r == NULL) { + _DELETE(l); + return NULL; + } len = snprintf( buf+len, BUFSIZ-len, "%s(%s,%s)", op, l, r); _DELETE(l); _DELETE(r); @@ -801,6 +814,8 @@ dnode *lst = se->data.lval->h; char *op = qname_fname(lst->data.lval); char *l = symbol2string(sql, lst->next->data.sym, err); + if (l == NULL) + return NULL; len = snprintf( buf+len, BUFSIZ-len, "%s(%s)", op, l); _DELETE(l); break; @@ -834,15 +849,25 @@ atom *a = sql_bind_arg(sql, l->h->data.i_val); return atom2sql(a); } else { - *err = dlist2string(sql, l, err); + char *e = dlist2string(sql, l, err); + if (e) + *err = e; } return NULL; } case SQL_CAST: { dlist *dl = se->data.lval; - char *val = symbol2string(sql, dl->h->data.sym, err); - char *tpe = subtype2string(&dl->h->next->data.typeval); - + char *val; + char *tpe; + + val = symbol2string(sql, dl->h->data.sym, err); + if (val == NULL) + return NULL; + tpe = subtype2string(&dl->h->next->data.typeval); + if (tpe == NULL) { + _DELETE(val); + return NULL; _______________________________________________ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list