diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2017-04-24 07:32:36 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2017-04-24 07:32:36 +0300 |
commit | 98e04eab9812876e2c10cfd1e4afd859b09b5cf7 (patch) | |
tree | 982abb8dc497bfbb645996aa0672798caf7d8746 | |
parent | a4ad1c093108ffa014aa59fe462bd3c063427216 (diff) | |
parent | 2b1f49035b8a849c718399ff6780d7600dc517a3 (diff) | |
download | egawk-98e04eab9812876e2c10cfd1e4afd859b09b5cf7.tar.gz egawk-98e04eab9812876e2c10cfd1e4afd859b09b5cf7.tar.bz2 egawk-98e04eab9812876e2c10cfd1e4afd859b09b5cf7.zip |
Merge branch 'master' into feature/api-mpfr
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | awk.h | 21 | ||||
-rw-r--r-- | helpers/ChangeLog | 4 | ||||
-rwxr-xr-x | helpers/test-build.sh | 49 |
4 files changed, 64 insertions, 18 deletions
@@ -1,3 +1,11 @@ +2017-04-24 Arnold D. Robbins <arnold@skeeve.com> + + * awk.h (NODE): Additional cleanups. Removed `aq' and `param_list' + elements from various unions and removed 'nextp' and + `a_opaque' defines. None of these were in use. + Rework the comment for valref, per suggestion from + Andrew Schorr. + 2017-04-23 Arnold D. Robbins <arnold@skeeve.com> * awkgram.y (nextc): Adjust so that 3.1.x behavior is restored @@ -345,7 +345,6 @@ typedef struct exp_node { Regexp *preg[2]; struct exp_node **av; BUCKET **bv; - void *aq; void (*uptr)(void); struct exp_instruction *iptr; } r; @@ -353,7 +352,6 @@ typedef struct exp_node { struct exp_node *extra; void (*aptr)(void); long xl; - char **param_list; } x; char *name; size_t reserved; @@ -384,20 +382,9 @@ typedef struct exp_node { } sub; NODETYPE type; unsigned int flags; - // April 2017: - // The NODE union will be the death of me yet. :-( - // - // On 64 bit Intel systems, at least, if compiling without MPFR, - // the valref (formerly) sref field needs to be at the end. In its - // original position it overlapped with stuff in the nodep part of - // the union causing things to break pretty badly. This doesn't - // happen on 32 bit compiles. - // - // I saw this on GCC 4.9.0, GCC 5.4.0, GCC 6.3.0, PCC, TCC and - // clang 3.8.0. - // - // We simply move valref out of the unions entirely to avoid future - // problems. + + // We access valref for both Node_val and Node_regex values, + // so it needs to be outside the union. long valref; /* type = Node_val */ @@ -476,7 +463,6 @@ typedef struct exp_node { #define vname sub.nodep.name #define lnode sub.nodep.l.lptr -#define nextp sub.nodep.l.lptr #define rnode sub.nodep.r.rptr /* Node_param_list */ @@ -551,7 +537,6 @@ typedef struct exp_node { /* Node_var_array: */ #define buckets sub.nodep.r.bv #define nodes sub.nodep.r.av -#define a_opaque sub.nodep.r.aq #define array_funcs sub.nodep.l.lp #define array_base sub.nodep.l.ll #define table_size sub.nodep.reflags diff --git a/helpers/ChangeLog b/helpers/ChangeLog index b08dec6c..df0741c9 100644 --- a/helpers/ChangeLog +++ b/helpers/ChangeLog @@ -1,3 +1,7 @@ +2017-04-24 Arnold D. Robbins <arnold@skeeve.com> + + * test-build.sh: New file. + 2017-03-20 Andrew J. Schorr <aschorr@telemetry-investments.com> * update-branches.sh: Robustness improvements. diff --git a/helpers/test-build.sh b/helpers/test-build.sh new file mode 100755 index 00000000..ce4aab50 --- /dev/null +++ b/helpers/test-build.sh @@ -0,0 +1,49 @@ +#! /bin/sh + +MIXED_COMPILERS="gcc /usr/gcc/bin/gcc clang" +OTHER_COMPILERS="tcc pcc" + +rm -f compile-results.txt + +compile () { + make -k + if make check + then + echo success: $1 $2 >> compile-results.txt + else + echo failure: $1 $2 >> compile-results.txt + fi +} + +configure_and_compile () { + for j in "" --disable-mpfr + do + ./configure $j CC="$1" + compile "$1" "$j" + done + make distclean +} + +(make distclean) + +for i in $OTHER_COMPILERS $MIXED_COMPILERS +do + configure_and_compile $i +done + +for i in $MIXED_COMPILERS +do + configure_and_compile "$i -m32" +done + +echo +echo ========================================== +echo +case $(grep failure compile-results.txt | wc -l) in +0) echo No failures! + # rm compile-results.txt + ;; +*) echo The following combinations failed: + grep failure compile-results.txt + ;; +esac |